blob: a767358aa75499407b612d439fe5c6b58adb3309 [file] [log] [blame]
function assert(b, i) {
if (!b)
throw new Error("Bad! " + i)
}
let f = function() {
return this;
}
noInline(f);
let fStrict = function() {
"use strict";
return this;
}
noInline(fStrict);
const globalThis = this;
for (let i = 0; i < 1000; i++)
assert(f() === globalThis, i);
for (let i = 0; i < 1000; i++)
assert(fStrict() === undefined);