summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-environment-01.js
blob: d6883ad8c8e15b2c48556e121d38ef4f38fc1f94 (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()
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);