Bug 1665330 - If a script is a module, increment the IgnoreDestructiveWrites counter r=hsivonen

Differential Revision: https://phabricator.services.mozilla.com/D99898
This commit is contained in:
yulia 2021-02-05 11:00:23 +00:00
parent 646fdbd459
commit ec9af4d409
6 changed files with 3 additions and 16 deletions

View File

@ -2613,7 +2613,7 @@ nsresult ScriptLoader::ProcessRequest(ScriptLoadRequest* aRequest) {
do_QueryInterface(aRequest->GetScriptElement());
nsCOMPtr<Document> doc;
if (!aRequest->mIsInline) {
if (!aRequest->mIsInline || aRequest->IsModuleRequest()) {
doc = scriptElem->OwnerDoc();
}

View File

@ -1,4 +0,0 @@
[module-static-import.html]
[document.write in an imported module]
expected: FAIL

View File

@ -2,8 +2,6 @@
prefs: [javascript.options.experimental.top_level_await:true]
expected:
if release_or_beta: TIMEOUT
OK
[document.write in an imported module]
expected:
if release_or_beta: TIMEOUT
PASS

View File

@ -1,11 +1,8 @@
[module-tla-immediate-promise.html]
prefs: [javascript.options.experimental.top_level_await:true]
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1678052
expected:
if release_or_beta: TIMEOUT
[OK, FAIL]
[document.write in an imported module]
expected:
if release_or_beta: TIMEOUT
[PASS, FAIL]

View File

@ -3,9 +3,9 @@
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1678052
expected:
if release_or_beta: TIMEOUT
[OK, FAIL]
OK
[document.write in an imported module]
expected:
if release_or_beta: TIMEOUT
[PASS, FAIL]
FAIL

View File

@ -1,4 +0,0 @@
[module.html]
[document.write in a module]
expected: FAIL