mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1559275 - Use JS::CompileOptions in AsyncScriptCompiler. r=kmag
Initializing OwningCompileOptions directly will soon be deprecated in order to have consistent defaults. This results in more consistent behavior of experimental features that are enabled based on realm flags. Differential Revision: https://phabricator.services.mozilla.com/D35071 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
89a3e34186
commit
243dd6a969
@ -91,10 +91,12 @@ nsresult AsyncScriptCompiler::Start(
|
||||
nsIPrincipal* aPrincipal) {
|
||||
mCharset = aOptions.mCharset;
|
||||
|
||||
mOptions.setNoScriptRval(!aOptions.mHasReturnValue)
|
||||
CompileOptions options(aCx);
|
||||
options.setFile(mURL.get())
|
||||
.setNoScriptRval(!aOptions.mHasReturnValue)
|
||||
.setCanLazilyParse(aOptions.mLazilyParse);
|
||||
|
||||
if (NS_WARN_IF(!mOptions.setFile(aCx, mURL.get()))) {
|
||||
if (NS_WARN_IF(!mOptions.copy(aCx, options))) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user