Bug 1724236 - Inline Compile(JS::SourceText) r=arai
The remaining Compile(nsAString) could be inlined as well, but it is only used in nsJSThunk::EvaluateScript and WindowScriptTimeoutHandler::Call. Right now, I'm just focusing on use by ScriptLoader. Differential Revision: https://phabricator.services.mozilla.com/D218452
This commit is contained in:
@@ -2822,7 +2822,10 @@ void ScriptLoader::InstantiateClassicScriptFromMaybeEncodedSource(
|
||||
RefPtr<JS::Stencil> stencil;
|
||||
ErrorResult erv;
|
||||
auto compile = [&](auto& source) {
|
||||
Compile(aCx, aCompileOptions, source, stencil, erv);
|
||||
stencil = CompileGlobalScriptToStencil(aCx, aCompileOptions, source);
|
||||
if (!stencil) {
|
||||
erv.NoteJSContextException(aCx);
|
||||
}
|
||||
};
|
||||
|
||||
MOZ_ASSERT(!maybeSource.empty());
|
||||
|
||||
Reference in New Issue
Block a user