1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/Source-element-03.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +// Owning elements and attribute names are attached to scripts compiled 1.5 +// off-thread. 1.6 + 1.7 +var g = newGlobal(); 1.8 +var dbg = new Debugger; 1.9 +var gDO = dbg.addDebuggee(g); 1.10 + 1.11 +var elt = new g.Object; 1.12 +var eltDO = gDO.makeDebuggeeValue(elt); 1.13 + 1.14 +var log = ''; 1.15 +dbg.onDebuggerStatement = function (frame) { 1.16 + log += 'd'; 1.17 + var source = frame.script.source; 1.18 + assertEq(source.element, eltDO); 1.19 + assertEq(source.elementAttributeName, 'mass'); 1.20 +}; 1.21 + 1.22 +g.offThreadCompileScript('debugger;', 1.23 + { element: elt, 1.24 + elementAttributeName: 'mass' }); 1.25 +log += 'o'; 1.26 +g.runOffThreadScript(); 1.27 +assertEq(log, 'od');