1// Copyright 2015 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5function Bar() { }
6function Baz() { }
7Baz.prototype = { __proto__: new Bar() }
8var x = new Baz();
9function foo(y) { return y instanceof Bar; }
10assertTrue(foo(x));
11Baz.prototype.__proto__ = null;
12assertFalse(foo(x));
13