09d14728ca
Call the @@hasInstance trap only when required by the spec. Bug: chromium:1052647 Change-Id: I7a0a3133c7b6280c6a3215e379bf02e9c22ffe55 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2082560 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#66558}
13 lines
344 B
JavaScript
13 lines
344 B
JavaScript
// Copyright 2020 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.
|
|
|
|
let useArgs = undefined;
|
|
function f(arg) {
|
|
useArgs = 'result' + arguments[0] + arg;
|
|
}
|
|
|
|
Intl.NumberFormat.__proto__ = { [Symbol.hasInstance]: f };
|
|
|
|
new Intl.NumberFormat();
|