Bug 774471: Store source map URLs in the ScriptSource, not on each JSScript. r=jimb

This commit is contained in:
Nick Fitzgerald
2012-08-13 12:39:57 -07:00
parent 24e5293331
commit 732ba5eafb
10 changed files with 107 additions and 89 deletions

View File

@@ -190,6 +190,9 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain, StackFrame *call
parser.freeTree(pn);
}
if (tokenStream.hasSourceMap())
ss->setSourceMap(tokenStream.releaseSourceMap());
#if JS_HAS_XML_SUPPORT
/*
* Prevent XML data theft via <script src="http://victim.com/foo.xml">.
@@ -338,6 +341,9 @@ frontend::CompileFunctionBody(JSContext *cx, HandleFunction fun, CompileOptions
pn = fn->pn_body;
}
if (parser.tokenStream.hasSourceMap())
ss->setSourceMap(parser.tokenStream.releaseSourceMap());
if (!EmitFunctionScript(cx, &funbce, pn))
return false;