blob: df06f55760f7439fec35df00e30e725e50ec9163 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// obj.getOwnPropertyNames() works when obj's referent is itself a cross-compartment wrapper.
var g = newGlobal({newCompartment: true});
var dbg = Debugger();
var gobj = dbg.addDebuggee(g);
g.p = {xyzzy: 8}; // makes a cross-compartment wrapper
g.p[Symbol.for("plugh")] = 9;
var wp = gobj.getOwnPropertyDescriptor("p").value;
var names = wp.getOwnPropertyNames();
assertEq(names.length, 1);
assertEq(names[0], "xyzzy");
|