blob: a43bd57c4f3cdc8d714874a5401f2a539f9c924c [file] [log] [blame]
let base = "sting";
let constructor = function() { };
constructor.prototype = 42;
function test(a, b) {
return a instanceof b;
}
noInline(test);
for (let i = 0; i < 10000; i++) {
let exception;
try {
var result = test(base, constructor);
} catch (e) {
exception = e;
}
if (exception)
throw new Error("Threw an exception: " + exception);
if (result !== false)
throw new Error("instanceof returned: " + result);
}