зеркало из https://github.com/mozilla/gecko-dev.git
Bug 969764: Properly carry the source's element attribute name through off-thread compilations. r=bhackett
This commit is contained in:
Родитель
22cd0287dc
Коммит
02e4ce0af0
|
@ -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()) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче