Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 254447@main - workers/interfaces/WorkerUtils/importScripts/catc…
…h.sub.any.*.html WPT tests are failing in WebKit https://bugs.webkit.org/show_bug.cgi?id=245098 Reviewed by Darin Adler. Implement the "muted error" logic from: - https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-imported-script (step 8) * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/catch.sub.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/catch.sub.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/catch.sub.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-cross-origin.sub.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-cross-origin.sub.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-redirect-to-cross-origin.sub.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-redirect-to-cross-origin.sub.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.worker-expected.txt: Rebaseline tests that are now passing. * Source/WebCore/loader/cache/CachedResource.cpp: (WebCore::CachedResource::setResponse): Response tainting should be "basic" for data URLs: - https://fetch.spec.whatwg.org/#concept-main-fetch (Step 11) * Source/WebCore/workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::importScripts): Implemented the "muted errors" logic from: - https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-imported-script (step 8) * Source/WebCore/workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::didReceiveResponse): * Source/WebCore/workers/WorkerScriptLoader.h: (WebCore::WorkerScriptLoader::responseTainting const): Keep track for the response's tainting so that we can use it in importScripts. Canonical link: https://commits.webkit.org/254447@main (cherry picked from commit d9c375a)
- Loading branch information
Showing
16 changed files
with
31 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 4 additions & 16 deletions
20
...sts/workers/interfaces/WorkerUtils/importScripts/catch.sub.any.serviceworker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,8 @@ | ||
|
||
PASS Same-origin syntax error | ||
PASS Same-origin throw | ||
FAIL Cross-origin syntax error assert_throws_dom: function "function () { | ||
importScripts(crossOrigin + | ||
"/workers/modules/resources/syntax-error.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Cross-origin throw assert_throws_dom: function "function () { | ||
importScripts(crossOrigin + | ||
"/workers/modules/resources/throw.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Redirect-to-cross-origin syntax error assert_throws_dom: function "function () { | ||
importScripts(redirectToCrossOrigin + | ||
"/workers/modules/resources/syntax-error.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Redirect-to-Cross-origin throw assert_throws_dom: function "function () { | ||
importScripts(redirectToCrossOrigin + | ||
"/workers/modules/resources/throw.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
PASS Cross-origin syntax error | ||
PASS Cross-origin throw | ||
PASS Redirect-to-cross-origin syntax error | ||
PASS Redirect-to-Cross-origin throw | ||
|
20 changes: 4 additions & 16 deletions
20
...ests/workers/interfaces/WorkerUtils/importScripts/catch.sub.any.sharedworker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,8 @@ | ||
|
||
PASS Same-origin syntax error | ||
PASS Same-origin throw | ||
FAIL Cross-origin syntax error assert_throws_dom: function "function () { | ||
importScripts(crossOrigin + | ||
"/workers/modules/resources/syntax-error.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Cross-origin throw assert_throws_dom: function "function () { | ||
importScripts(crossOrigin + | ||
"/workers/modules/resources/throw.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Redirect-to-cross-origin syntax error assert_throws_dom: function "function () { | ||
importScripts(redirectToCrossOrigin + | ||
"/workers/modules/resources/syntax-error.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Redirect-to-Cross-origin throw assert_throws_dom: function "function () { | ||
importScripts(redirectToCrossOrigin + | ||
"/workers/modules/resources/throw.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
PASS Cross-origin syntax error | ||
PASS Cross-origin throw | ||
PASS Redirect-to-cross-origin syntax error | ||
PASS Redirect-to-Cross-origin throw | ||
|
20 changes: 4 additions & 16 deletions
20
...form-tests/workers/interfaces/WorkerUtils/importScripts/catch.sub.any.worker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,8 @@ | ||
|
||
PASS Same-origin syntax error | ||
PASS Same-origin throw | ||
FAIL Cross-origin syntax error assert_throws_dom: function "function () { | ||
importScripts(crossOrigin + | ||
"/workers/modules/resources/syntax-error.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Cross-origin throw assert_throws_dom: function "function () { | ||
importScripts(crossOrigin + | ||
"/workers/modules/resources/throw.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Redirect-to-cross-origin syntax error assert_throws_dom: function "function () { | ||
importScripts(redirectToCrossOrigin + | ||
"/workers/modules/resources/syntax-error.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
FAIL Redirect-to-Cross-origin throw assert_throws_dom: function "function () { | ||
importScripts(redirectToCrossOrigin + | ||
"/workers/modules/resources/throw.js"); | ||
}" threw object "Error: Script error." that is not a DOMException NetworkError: property "code" is equal to undefined, expected 19 | ||
PASS Cross-origin syntax error | ||
PASS Cross-origin throw | ||
PASS Redirect-to-cross-origin syntax error | ||
PASS Redirect-to-Cross-origin throw | ||
|
6 changes: 1 addition & 5 deletions
6
...ces/WorkerUtils/importScripts/report-error-cross-origin.sub.any.sharedworker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...nterfaces/WorkerUtils/importScripts/report-error-cross-origin.sub.any.worker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...ils/importScripts/report-error-redirect-to-cross-origin.sub.any.sharedworker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...rkerUtils/importScripts/report-error-redirect-to-cross-origin.sub.any.worker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...tils/importScripts/report-error-setTimeout-cross-origin.sub.any.sharedworker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...orkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.worker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...cripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.sharedworker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...mportScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.worker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters