Merge inbound to mozilla-central. a=merge

This commit is contained in:
Gurzau Raul
2019-02-14 19:01:42 +02:00
27 changed files with 424 additions and 6394 deletions

View File

@@ -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;
}