Bug 774471: Store source map URLs in the ScriptSource, not on each JSScript. r=jimb
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user