blob: 729a72262b8519193ccf0a674be0e94ec40a605b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Basic preventExtensions test.
var g = newGlobal();
var obj = g.eval("({x: 1})");
assertEq(g.Object.isExtensible(obj), true);
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
var objw = gw.makeDebuggeeValue(obj);
assertEq(objw.isExtensible(), true);
assertEq(objw.preventExtensions(), undefined);
assertEq(g.Object.isExtensible(obj), false);
assertEq(objw.isExtensible(), false);
// Calling preventExtensions again has no effect.
assertEq(objw.preventExtensions(), undefined);
|