blob: 702a6ef7122ea7cdda1165dcc1e1220be7a8c72a (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// source.element is undefined when bad values are passed to evaluate().
var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
for (let nonObject of [32, "[object Object]", null, undefined]) {
g.evaluate("function f(x) { return 2*x; }", {element: nonObject});
var fw = gw.getOwnPropertyDescriptor('f').value;
assertEq(fw.script.source.element, undefined);
}
|