mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 969764: Properly carry the source's element attribute name through off-thread compilations. r=bhackett
This commit is contained in:
parent
72560b4770
commit
5cb4c2e154
24
js/src/jit-test/tests/debug/Source-element-03.js
Normal file
24
js/src/jit-test/tests/debug/Source-element-03.js
Normal file
@ -0,0 +1,24 @@
|
||||
// Owning elements and attribute names are attached to scripts compiled
|
||||
// off-thread.
|
||||
|
||||
var g = newGlobal();
|
||||
var dbg = new Debugger;
|
||||
var gDO = dbg.addDebuggee(g);
|
||||
|
||||
var elt = new g.Object;
|
||||
var eltDO = gDO.makeDebuggeeValue(elt);
|
||||
|
||||
var log = '';
|
||||
dbg.onDebuggerStatement = function (frame) {
|
||||
log += 'd';
|
||||
var source = frame.script.source;
|
||||
assertEq(source.element, eltDO);
|
||||
assertEq(source.elementAttributeName, 'mass');
|
||||
};
|
||||
|
||||
g.offThreadCompileScript('debugger;',
|
||||
{ element: elt,
|
||||
elementAttributeName: 'mass' });
|
||||
log += 'o';
|
||||
g.runOffThreadScript();
|
||||
assertEq(log, 'od');
|
@ -4355,6 +4355,7 @@ JS::OwningCompileOptions::copy(JSContext *cx, const ReadOnlyCompileOptions &rhs)
|
||||
setPrincipals(rhs.principals());
|
||||
setOriginPrincipals(rhs.originPrincipals());
|
||||
setElement(rhs.element());
|
||||
setElementAttributeName(rhs.elementAttributeName());
|
||||
|
||||
return (setFileAndLine(cx, rhs.filename(), rhs.lineno) &&
|
||||
setSourceMapURL(cx, rhs.sourceMapURL()) &&
|
||||
|
Loading…
Reference in New Issue
Block a user