blob: aa99cc4bb0923a71c23a2de843a4ab53335190ac [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error(`bad value: ${String(actual)}`);
}
var otherRealm = createGlobalObject();
shouldBe(otherRealm.Number.prototype.toLocaleString.call(new Number(42)), `42`)
var numberObject = new Number(42);
numberObject.__proto__ = null;
shouldBe(Number.prototype.toLocaleString.call(numberObject), `42`)