blob: a24528bec63cd5ab80d49f4532501259951e15b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// obj.getOwnPropertyDescriptor works on accessor properties.
var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
var gdo = dbg.addDebuggee(g);
g.called = false;
g.eval("var a = {get x() { called = true; }};");
var desc = gdo.getOwnPropertyDescriptor("a").value.getOwnPropertyDescriptor("x");
assertEq(g.called, false);
assertEq(desc.enumerable, true);
assertEq(desc.configurable, true);
assertEq("value" in desc, false);
assertEq("writable" in desc, false);
assertEq(desc.get instanceof Debugger.Object, true);
assertEq(desc.get.class, "Function");
assertEq(desc.set, undefined);
|