blob: a171e496f3d40ae718c35e51c0d2431ed6826d6a [file] [log] [blame]
var o = Object.freeze([]),
leak = {};
try {
throw o;
} catch (ex) {}
if(o.stack !== undefined)
throw new Error("the stack was leaked.");
o.stack = leak;
if(o.stack === leak)
throw new Error("the object wasn't frozen.");
o.other = "wrong";
if(o.other === "wrong")
throw new Error("the object wasn't frozen.");
o = Object.freeze({"hi": "other"});
try {
throw o;
} catch (ex) {}
o.stack = leak;
if(o.stack !== undefined)
throw new Error("the stack was leaked.");
o.stack = leak;
if(o.stack === leak)
throw new Error("the object wasn't frozen.");
o.other = "wrong";
if(o.other === "wrong")
throw new Error("the object wasn't frozen.");