blob: 35865a89107c884fd4d91ae0ed0e0bbeab5bf319 [file] [log] [blame]
function foo(o, p)
{
return o instanceof p;
}
noInline(foo);
class Foo { }
function Bar() { }
Bar.prototype = new Foo();
new Foo().thingy = 42;
class Baz { }
for (var i = 0; i < 10000; ++i) {
var result = foo(new Bar(), Baz);
if (result)
throw "Error: bad result in loop: " + result;
}
Bar.prototype.__proto__ = new Baz();
var result = foo(new Bar(), Baz);
if (!result)
throw "Error: bad result at end: " + result;