blob: 7f85caa94175437fe796680442b6782d2d700748 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// obj.getOwnPropertySymbols() 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
var sym = Symbol("plugh");
g.p[sym] = 9;
var wp = gobj.getOwnPropertyDescriptor("p").value;
var names = wp.getOwnPropertySymbols();
assertEq(names.length, 1);
assertEq(names[0], sym);
|