Backed out 3 changesets (bug 1763586) for causing mochitest-chrome failures on test_Debugger.Source.prototype.element.html.
Backed out changeset f6b6ccfce3d1 (bug 1763586) Backed out changeset ca0157c919a9 (bug 1763586) Backed out changeset e0294a6f9f9f (bug 1763586)
This commit is contained in:
@@ -242,7 +242,8 @@ already_AddRefed<ModuleLoadRequest> ModuleLoader::CreateTopLevel(
|
||||
|
||||
already_AddRefed<ModuleLoadRequest> ModuleLoader::CreateStaticImport(
|
||||
nsIURI* aURI, ModuleLoadRequest* aParent) {
|
||||
RefPtr<ScriptLoadContext> newContext = new ScriptLoadContext();
|
||||
RefPtr<ScriptLoadContext> newContext =
|
||||
new ScriptLoadContext(aParent->GetLoadContext()->mElement);
|
||||
newContext->mIsInline = false;
|
||||
// Propagated Parent values. TODO: allow child modules to use root module's
|
||||
// script mode.
|
||||
@@ -264,13 +265,15 @@ already_AddRefed<ModuleLoadRequest> ModuleLoader::CreateDynamicImport(
|
||||
MOZ_ASSERT(aSpecifier);
|
||||
MOZ_ASSERT(aPromise);
|
||||
|
||||
RefPtr<ScriptFetchOptions> options = nullptr;
|
||||
RefPtr<ScriptFetchOptions> options;
|
||||
nsIURI* baseURL = nullptr;
|
||||
RefPtr<ScriptLoadContext> context = new ScriptLoadContext();
|
||||
RefPtr<ScriptLoadContext> context;
|
||||
|
||||
if (aMaybeActiveScript) {
|
||||
options = aMaybeActiveScript->GetFetchOptions();
|
||||
baseURL = aMaybeActiveScript->BaseURL();
|
||||
nsCOMPtr<Element> element = aMaybeActiveScript->GetScriptElement();
|
||||
context = new ScriptLoadContext(element);
|
||||
} else {
|
||||
// We don't have a referencing script so fall back on using
|
||||
// options from the document. This can happen when the user
|
||||
@@ -283,9 +286,10 @@ already_AddRefed<ModuleLoadRequest> ModuleLoader::CreateDynamicImport(
|
||||
BasePrincipal::Cast(principal)->ContentScriptAddonPolicy());
|
||||
MOZ_ASSERT_IF(GetKind() == Normal, principal == document->NodePrincipal());
|
||||
|
||||
options = new ScriptFetchOptions(
|
||||
mozilla::CORS_NONE, document->GetReferrerPolicy(), principal, nullptr);
|
||||
options = new ScriptFetchOptions(mozilla::CORS_NONE,
|
||||
document->GetReferrerPolicy(), principal);
|
||||
baseURL = document->GetDocBaseURI();
|
||||
context = new ScriptLoadContext(nullptr);
|
||||
}
|
||||
|
||||
context->mIsInline = false;
|
||||
|
||||
Reference in New Issue
Block a user