29bd8286ee
This patch ensures that Intl bound method getters can't be retargeted to other Intl types. If that were to happen, then a RUNTIME_ASSERT would trigger later. This patch throws a TypeError instead, as the specification requires. BUG=v8:4870 Review-Url: https://codereview.chromium.org/1986763003 Cr-Commit-Position: refs/heads/master@{#36330}
9 lines
329 B
JavaScript
9 lines
329 B
JavaScript
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
assertThrows(() =>
|
|
Object.getOwnPropertyDescriptor(Intl.Collator.prototype, 'compare')
|
|
.get.call(new Intl.DateTimeFormat())('a', 'b'),
|
|
TypeError);
|