Bug 1689734 - Further restrict ScriptPreloader use of CompileOptions. r=kmag,arai
The JS CompileOptions used to load cache entries must be consistent with eachother to avoid subtle and serious bugs. This adds additional checks and makes more consistent use of `FillCompileOptionsForCachedScript`. This patch is a refactoring and should not change any behaviour. Depends on D103515 Differential Revision: https://phabricator.services.mozilla.com/D103516
This commit is contained in:
@@ -1260,7 +1260,6 @@ void nsMessageManagerScriptExecutor::TryCacheLoadAndCompileScript(
|
||||
ScriptPreloader::FillCompileOptionsForCachedScript(options);
|
||||
options.setFileAndLine(url.get(), 1);
|
||||
options.setNonSyntacticScope(true);
|
||||
options.setSourceIsLazy(true);
|
||||
|
||||
JS::Rooted<JSScript*> script(cx);
|
||||
script =
|
||||
|
||||
Reference in New Issue
Block a user