c7eb436d09
Flags removed (all begin with "harmony-"): function-name instanceof iterator-close unicode-regexps regexp-exec regexp-subclass species BUG=v8:3566, v8:3648, v8:3699, v8:4093, v8:4447, v8:4602 Review-Url: https://codereview.chromium.org/2096933002 Cr-Commit-Position: refs/heads/master@{#37235}
20 lines
509 B
JavaScript
20 lines
509 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.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
function F() {}
|
|
var f = new F
|
|
|
|
function foo(x) { return x instanceof F };
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
assertFalse(foo(1));
|
|
|
|
var proto = Object.getPrototypeOf(F);
|
|
Object.setPrototypeOf(F, null);
|
|
F[Symbol.hasInstance] = function(v) { return true };
|
|
Object.setPrototypeOf(F, proto);
|
|
|
|
assertTrue(foo(1));
|