blob: ea74761708760222b13b04c2eb574adb1a33a5bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// obj.environment is undefined when the referent is not a JS function.
var g = newGlobal({newCompartment: true})
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
assertEq(gw.environment, undefined);
g.eval("var r = /x/;");
var rw = gw.getOwnPropertyDescriptor("r").value;
assertEq(rw.class, "RegExp");
assertEq(rw.environment, undefined);
// Native function.
var fw = gw.getOwnPropertyDescriptor("parseInt").value;
assertEq(fw.class, "Function");
assertEq(fw.environment, undefined);
|