Merge inbound to mozilla-central. a=merge
This commit is contained in:
@@ -760,6 +760,10 @@ RefPtr<GenericPromise> ScriptLoader::StartFetchingModuleAndDependencies(
|
||||
}
|
||||
|
||||
static ScriptLoader* GetCurrentScriptLoader(JSContext* aCx) {
|
||||
auto reportError = mozilla::MakeScopeExit([aCx]() {
|
||||
JS_ReportErrorASCII(aCx, "No ScriptLoader found for the current context");
|
||||
});
|
||||
|
||||
JSObject* object = JS::CurrentGlobalOrNull(aCx);
|
||||
if (!object) {
|
||||
return nullptr;
|
||||
@@ -786,6 +790,7 @@ static ScriptLoader* GetCurrentScriptLoader(JSContext* aCx) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
reportError.release();
|
||||
return loader;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user