Changeset 269227 in webkit
- Timestamp:
- Oct 31, 2020 9:11:57 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269226 r269227 1 2020-10-31 Chris Dumez <cdumez@apple.com> 2 3 Promises returned by our DOM API have the caller's global instead of the callee's 4 https://bugs.webkit.org/show_bug.cgi?id=218363 5 6 Reviewed by Darin Adler and Ryosuke Niwa. 7 8 * fast/js-promise-from-detached-iframe-expected.txt: Added. 9 * fast/js-promise-from-detached-iframe.html: Added. 10 Add layout test to verify that JS promises from iframes properly get settled after the 11 the iframe gets removed from the doucment. I have verified that this test passes in 12 both Firefox and Chrome. 13 14 * http/tests/eventloop/promise-from-cross-origin-detached-iframe-expected.txt: Added. 15 * http/tests/eventloop/promise-from-cross-origin-detached-iframe.html: Added. 16 * http/tests/eventloop/resources/promise-from-cross-origin-detached-iframe-subframe.html: Added. 17 Similar test as above but in a cross-origin iframe. Ryosuke recommended adding this test 18 since event loops only shared between documents of similar origins. I have verified that this 19 test passes in both Firefox and Chrome. 20 21 * platform/mac/editing/input/reveal-caret-of-multiline-input-expected.txt: 22 Rebaseline existing test that has slightly different output. 23 24 * requestidlecallback/requestidlecallback-document-gc-expected.txt: 25 * requestidlecallback/requestidlecallback-document-gc.html: 26 Tweak test to check that enough documents are gc's at regular intervals, instead of expecting 27 them to be collected in a 0-timer. 28 29 * webaudio/promise-global-object-expected.txt: Added. 30 * webaudio/promise-global-object.html: Added. 31 Add test to verify that the global object of the promise is correct when the promise comes 32 from calling a DOM API in an subframe. Previously, we would incorrectly use the caller's 33 global instead of the callee's global. I have verified that this test passes in both Firefox 34 and Chrome. 35 1 36 2020-10-31 Sam Weinig <weinig@apple.com> 2 37 -
trunk/LayoutTests/imported/w3c/ChangeLog
r269214 r269227 1 2020-10-31 Chris Dumez <cdumez@apple.com> 2 3 Promises returned by our DOM API have the caller's global instead of the callee's 4 https://bugs.webkit.org/show_bug.cgi?id=218363 5 6 Reviewed by Darin Adler and Ryosuke Niwa. 7 8 * web-platform-tests/fetch/range/sw.https.window.js: 9 Re-import latest version of the test from upstream. Without those upstream changes, there would be a testharness error 10 when running this test. 11 12 * web-platform-tests/html/cross-origin-embedder-policy/coep-on-response-from-service-worker.https-expected.txt: 13 * web-platform-tests/service-workers/service-worker/controller-with-no-fetch-event-handler.https-expected.txt: 14 * web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt: 15 * web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt: 16 * web-platform-tests/service-workers/service-worker/fetch-response-taint.https-expected.txt: 17 * web-platform-tests/service-workers/service-worker/redirected-response.https-expected.txt: 18 * web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/promise-methods-after-discard-expected.txt: 19 * web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/startrendering-after-discard-expected.txt: 20 Rebaseline WPT tests that are now passing. 21 1 22 2020-10-30 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/range/sw.https.window.js
r264144 r269227 87 87 // Fetching should reject 88 88 const fetchPromise = w.fetch('?action=use-stored-ranged-response', { mode: 'no-cors' }); 89 promise_rejects_js(t,TypeError, fetchPromise);89 await promise_rejects_js(t, w.TypeError, fetchPromise); 90 90 91 91 // Script loading should error too 92 92 const loadScriptPromise = loadScript('?action=use-stored-ranged-response', { doc: w.document }); 93 promise_rejects_js(t, Error, loadScriptPromise);93 await promise_rejects_js(t, Error, loadScriptPromise); 94 94 95 95 await loadScriptPromise.catch(() => {}); -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/coep-on-response-from-service-worker.https-expected.txt
r267646 r269227 10 10 PASS making a same-origin request for no CORP 11 11 PASS making a same-origin request for CORP: cross-origin 12 FAIL making a cross-origin request for CORP: same-origin promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt because it violates the resource's Cross-Origin-Resource-Policy response header." ("TypeError") expected instance of function "function TypeError() { 13 [native code] 14 }" ("TypeError") 12 PASS making a cross-origin request for CORP: same-origin 15 13 FAIL making a cross-origin request for no CORP assert_unreached: Should have rejected: undefined Reached unreachable code 16 14 PASS making a cross-origin request for CORP: cross-origin 17 FAIL making a cross-origin request for CORP: same-origin [PASS THROUGH] promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cancelled load to https://127.0.0.1:9443/html/cross-origin-embedder-policy/resources/nothing-same-origin-corp.txt?passthrough because it violates the resource's Cross-Origin-Resource-Policy response header." ("TypeError") expected instance of function "function TypeError() { 18 [native code] 19 }" ("TypeError") 15 PASS making a cross-origin request for CORP: same-origin [PASS THROUGH] 20 16 FAIL making a cross-origin request for no CORP [PASS THROUGH] assert_unreached: Should have rejected: undefined Reached unreachable code 21 17 PASS making a cross-origin request for CORP: cross-origin [PASS THROUGH] 22 FAIL making a cross-origin request with CORS without ACAO promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin." ("TypeError") expected instance of function "function TypeError() { 23 [native code] 24 }" ("TypeError") 18 PASS making a cross-origin request with CORS without ACAO 25 19 PASS making a cross-origin request with CORS 26 20 PASS teardown -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/controller-with-no-fetch-event-handler.https-expected.txt
r267647 r269227 2 2 PASS global setup 3 3 PASS cross-origin request, no-cors mode 4 FAIL cross-origin request, cors denied promise_rejects_js: function "function () { throw e }" threw object "TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin." ("TypeError") expected instance of function "function TypeError() { 5 [native code] 6 }" ("TypeError") 4 PASS cross-origin request, cors denied 7 5 PASS cross-origin request, cors approved 8 6 PASS cleanup global state -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt
r267647 r269227 20 20 PASS Non-navigation, manual redirect, no-cors mode Request redirected to cors with credentials should succeed opaqueredirect interception and response should not be redirected 21 21 PASS Non-navigation, follow redirect, cors mode Request redirected to same-origin without credentials should succeed interception and response should be redirected 22 FAIL Non-navigation, follow redirect, cors mode Request redirected to no-cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-follow-cors-redirects-to-nocors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin." ("TypeError") expected instance of function "function TypeError() { 23 [native code] 24 }" ("TypeError") 22 PASS Non-navigation, follow redirect, cors mode Request redirected to no-cors without credentials should fail interception and response should not be redirected 25 23 PASS Non-navigation, follow redirect, cors mode Request redirected to cors without credentials should succeed interception and response should be redirected 26 24 PASS Non-navigation, follow redirect, same-origin mode Request redirected to same-origin without credentials should succeed interception and response should be redirected 27 FAIL Non-navigation, follow redirect, same-origin mode Request redirected to no-cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-follow-sameorigin-redirects-to-nocors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Unsafe attempt to load URL https://127.0.0.1:9443/service-workers/service-worker/resources/success.py from origin https://localhost:9443. Domains, protocols and ports must match. 28 " ("TypeError") expected instance of function "function TypeError() { 29 [native code] 30 }" ("TypeError") 31 FAIL Non-navigation, follow redirect, same-origin mode Request redirected to cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-follow-sameorigin-redirects-to-cors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Unsafe attempt to load URL https://127.0.0.1:9443/service-workers/service-worker/resources/success.py?ACAOrigin=https%3A%2F%2Flocalhost%3A9443 from origin https://localhost:9443. Domains, protocols and ports must match. 32 " ("TypeError") expected instance of function "function TypeError() { 33 [native code] 34 }" ("TypeError") 25 PASS Non-navigation, follow redirect, same-origin mode Request redirected to no-cors without credentials should fail interception and response should not be redirected 26 PASS Non-navigation, follow redirect, same-origin mode Request redirected to cors without credentials should fail interception and response should not be redirected 35 27 PASS Non-navigation, follow redirect, no-cors mode Request redirected to same-origin without credentials should succeed interception and response should be redirected 36 28 PASS Non-navigation, follow redirect, no-cors mode Request redirected to no-cors without credentials should succeed interception and response should not be redirected 37 29 PASS Non-navigation, follow redirect, no-cors mode Request redirected to cors without credentials should succeed interception and response should not be redirected 38 30 PASS Non-navigation, follow redirect, cors mode Request redirected to same-origin with credentials should succeed interception and response should be redirected 39 FAIL Non-navigation, follow redirect, cors mode Request redirected to no-cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-follow-cors-redirects-to-nocors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross-origin redirection to https://127.0.0.1:9443/service-workers/service-worker/resources/success.py denied by Cross-Origin Resource Sharing policy: redirection URL https://foo:bar@127.0.0.1:9443/service-workers/service-worker/resources/success.py has credentials" ("TypeError") expected instance of function "function TypeError() { 40 [native code] 41 }" ("TypeError") 42 FAIL Non-navigation, follow redirect, cors mode Request redirected to cors with credentials should fail interception and response should be redirected promise_rejects_js: Must fail to fetch: url=/nonav-follow-cors-redirects-to-cors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross-origin redirection to https://127.0.0.1:9443/service-workers/service-worker/resources/success.py?ACAOrigin=https%3A%2F%2Flocalhost%3A9443 denied by Cross-Origin Resource Sharing policy: redirection URL https://foo:bar@127.0.0.1:9443/service-workers/service-worker/resources/success.py?ACAOrigin=https%3A%2F%2Flocalhost%3A9443 has credentials" ("TypeError") expected instance of function "function TypeError() { 43 [native code] 44 }" ("TypeError") 31 PASS Non-navigation, follow redirect, cors mode Request redirected to no-cors with credentials should fail interception and response should not be redirected 32 PASS Non-navigation, follow redirect, cors mode Request redirected to cors with credentials should fail interception and response should be redirected 45 33 PASS Non-navigation, follow redirect, same-origin mode Request redirected to same-origin with credentials should succeed interception and response should be redirected 46 FAIL Non-navigation, follow redirect, same-origin mode Request redirected to no-cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-follow-sameorigin-redirects-to-nocors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Unsafe attempt to load URL https://127.0.0.1:9443/service-workers/service-worker/resources/success.py from origin https://localhost:9443. Domains, protocols and ports must match. 47 " ("TypeError") expected instance of function "function TypeError() { 48 [native code] 49 }" ("TypeError") 50 FAIL Non-navigation, follow redirect, same-origin mode Request redirected to cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-follow-sameorigin-redirects-to-cors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Unsafe attempt to load URL https://127.0.0.1:9443/service-workers/service-worker/resources/success.py?ACAOrigin=https%3A%2F%2Flocalhost%3A9443 from origin https://localhost:9443. Domains, protocols and ports must match. 51 " ("TypeError") expected instance of function "function TypeError() { 52 [native code] 53 }" ("TypeError") 34 PASS Non-navigation, follow redirect, same-origin mode Request redirected to no-cors with credentials should fail interception and response should not be redirected 35 PASS Non-navigation, follow redirect, same-origin mode Request redirected to cors with credentials should fail interception and response should not be redirected 54 36 PASS Non-navigation, follow redirect, no-cors mode Request redirected to same-origin with credentials should succeed interception and response should be redirected 55 37 PASS Non-navigation, follow redirect, no-cors mode Request redirected to no-cors with credentials should succeed interception and response should not be redirected 56 38 PASS Non-navigation, follow redirect, no-cors mode Request redirected to cors with credentials should succeed interception and response should not be redirected 57 FAIL Non-navigation, error redirect, cors mode Request redirected to same-origin without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-cors-redirects-to-sameorigin-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Flocalhost%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 58 [native code] 59 }" ("TypeError") 60 FAIL Non-navigation, error redirect, cors mode Request redirected to no-cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-cors-redirects-to-nocors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 61 [native code] 62 }" ("TypeError") 63 FAIL Non-navigation, error redirect, cors mode Request redirected to cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-cors-redirects-to-cors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py%3FACAOrigin%3Dhttps%253A%252F%252Flocalhost%253A9443" ("TypeError") expected instance of function "function TypeError() { 64 [native code] 65 }" ("TypeError") 66 FAIL Non-navigation, error redirect, same-origin mode Request redirected to same-origin without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-sameorigin-redirects-to-sameorigin-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Flocalhost%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 67 [native code] 68 }" ("TypeError") 69 FAIL Non-navigation, error redirect, same-origin mode Request redirected to no-cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-sameorigin-redirects-to-nocors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 70 [native code] 71 }" ("TypeError") 72 FAIL Non-navigation, error redirect, same-origin mode Request redirected to cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-sameorigin-redirects-to-cors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py%3FACAOrigin%3Dhttps%253A%252F%252Flocalhost%253A9443" ("TypeError") expected instance of function "function TypeError() { 73 [native code] 74 }" ("TypeError") 75 FAIL Non-navigation, error redirect, no-cors mode Request redirected to same-origin without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-nocors-redirects-to-sameorigin-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Flocalhost%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 76 [native code] 77 }" ("TypeError") 78 FAIL Non-navigation, error redirect, no-cors mode Request redirected to no-cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-nocors-redirects-to-nocors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 79 [native code] 80 }" ("TypeError") 81 FAIL Non-navigation, error redirect, no-cors mode Request redirected to cors without credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-nocors-redirects-to-cors-nocreds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252F127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py%3FACAOrigin%3Dhttps%253A%252F%252Flocalhost%253A9443" ("TypeError") expected instance of function "function TypeError() { 82 [native code] 83 }" ("TypeError") 84 FAIL Non-navigation, error redirect, cors mode Request redirected to same-origin with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-cors-redirects-to-sameorigin-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540localhost%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40localhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 85 [native code] 86 }" ("TypeError") 87 FAIL Non-navigation, error redirect, cors mode Request redirected to no-cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-cors-redirects-to-nocors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 88 [native code] 89 }" ("TypeError") 90 FAIL Non-navigation, error redirect, cors mode Request redirected to cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-cors-redirects-to-cors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py%3FACAOrigin%3Dhttps%253A%252F%252Flocalhost%253A9443" ("TypeError") expected instance of function "function TypeError() { 91 [native code] 92 }" ("TypeError") 93 FAIL Non-navigation, error redirect, same-origin mode Request redirected to same-origin with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-sameorigin-redirects-to-sameorigin-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540localhost%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40localhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 94 [native code] 95 }" ("TypeError") 96 FAIL Non-navigation, error redirect, same-origin mode Request redirected to no-cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-sameorigin-redirects-to-nocors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 97 [native code] 98 }" ("TypeError") 99 FAIL Non-navigation, error redirect, same-origin mode Request redirected to cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-sameorigin-redirects-to-cors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py%3FACAOrigin%3Dhttps%253A%252F%252Flocalhost%253A9443" ("TypeError") expected instance of function "function TypeError() { 100 [native code] 101 }" ("TypeError") 102 FAIL Non-navigation, error redirect, no-cors mode Request redirected to same-origin with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-nocors-redirects-to-sameorigin-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540localhost%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40localhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 103 [native code] 104 }" ("TypeError") 105 FAIL Non-navigation, error redirect, no-cors mode Request redirected to no-cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-nocors-redirects-to-nocors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py" ("TypeError") expected instance of function "function TypeError() { 106 [native code] 107 }" ("TypeError") 108 FAIL Non-navigation, error redirect, no-cors mode Request redirected to cors with credentials should fail interception and response should not be redirected promise_rejects_js: Must fail to fetch: url=/nonav-error-nocors-redirects-to-cors-creds?url=redirect.py%3FRedirect%3Dhttps%253A%252F%252Ffoo%253Abar%2540127.0.0.1%253A9443%252Fservice-workers%252Fservice-worker%252Fresources%252Fsuccess.py%253FACAOrigin%253Dhttps%25253A%25252F%25252Flocalhost%25253A9443 function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Ffoo%3Abar%40127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsuccess.py%3FACAOrigin%3Dhttps%253A%252F%252Flocalhost%253A9443" ("TypeError") expected instance of function "function TypeError() { 109 [native code] 110 }" ("TypeError") 39 PASS Non-navigation, error redirect, cors mode Request redirected to same-origin without credentials should fail interception and response should not be redirected 40 PASS Non-navigation, error redirect, cors mode Request redirected to no-cors without credentials should fail interception and response should not be redirected 41 PASS Non-navigation, error redirect, cors mode Request redirected to cors without credentials should fail interception and response should not be redirected 42 PASS Non-navigation, error redirect, same-origin mode Request redirected to same-origin without credentials should fail interception and response should not be redirected 43 PASS Non-navigation, error redirect, same-origin mode Request redirected to no-cors without credentials should fail interception and response should not be redirected 44 PASS Non-navigation, error redirect, same-origin mode Request redirected to cors without credentials should fail interception and response should not be redirected 45 PASS Non-navigation, error redirect, no-cors mode Request redirected to same-origin without credentials should fail interception and response should not be redirected 46 PASS Non-navigation, error redirect, no-cors mode Request redirected to no-cors without credentials should fail interception and response should not be redirected 47 PASS Non-navigation, error redirect, no-cors mode Request redirected to cors without credentials should fail interception and response should not be redirected 48 PASS Non-navigation, error redirect, cors mode Request redirected to same-origin with credentials should fail interception and response should not be redirected 49 PASS Non-navigation, error redirect, cors mode Request redirected to no-cors with credentials should fail interception and response should not be redirected 50 PASS Non-navigation, error redirect, cors mode Request redirected to cors with credentials should fail interception and response should not be redirected 51 PASS Non-navigation, error redirect, same-origin mode Request redirected to same-origin with credentials should fail interception and response should not be redirected 52 PASS Non-navigation, error redirect, same-origin mode Request redirected to no-cors with credentials should fail interception and response should not be redirected 53 PASS Non-navigation, error redirect, same-origin mode Request redirected to cors with credentials should fail interception and response should not be redirected 54 PASS Non-navigation, error redirect, no-cors mode Request redirected to same-origin with credentials should fail interception and response should not be redirected 55 PASS Non-navigation, error redirect, no-cors mode Request redirected to no-cors with credentials should fail interception and response should not be redirected 56 PASS Non-navigation, error redirect, no-cors mode Request redirected to cors with credentials should fail interception and response should not be redirected 111 57 PASS restore global state 112 58 -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt
r267647 r269227 1 2 Harness Error (FAIL), message = Unhandled rejection: FetchEvent.respondWith received an error: undefined3 1 4 2 PASS Verify FetchEvent for resources. -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-response-taint.https-expected.txt
r267647 r269227 10 10 PASS fetching url:"https://localhost:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"same-origin" should succeed. 11 11 PASS fetching url:"https://localhost:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"include" should succeed. 12 FAIL url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 13 [native code] 14 }" ("TypeError") 15 FAIL url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 16 [native code] 17 }" ("TypeError") 18 FAIL url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 19 [native code] 20 }" ("TypeError") 12 PASS url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"omit" should fail. 13 PASS url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"same-origin" should fail. 14 PASS url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"include" should fail. 21 15 PASS fetching url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"omit" should succeed. 22 16 PASS fetching url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"same-origin" should succeed. 23 17 PASS fetching url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"include" should succeed. 24 FAIL url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin." ("TypeError") expected instance of function "function TypeError() { 25 [native code] 26 }" ("TypeError") 27 FAIL url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin." ("TypeError") expected instance of function "function TypeError() { 28 [native code] 29 }" ("TypeError") 30 FAIL url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Origin https://localhost:9443 is not allowed by Access-Control-Allow-Origin." ("TypeError") expected instance of function "function TypeError() { 31 [native code] 32 }" ("TypeError") 18 PASS url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"omit" should fail. 19 PASS url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"same-origin" should fail. 20 PASS url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"include" should fail. 33 21 PASS fetching url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=*" mode:"cors" credentials:"omit" should succeed. 34 22 PASS fetching url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=*" mode:"cors" credentials:"same-origin" should succeed. 35 FAIL url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=*" mode:"cors" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true." ("TypeError") expected instance of function "function TypeError() { 36 [native code] 37 }" ("TypeError") 23 PASS url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=*" mode:"cors" credentials:"include" should fail. 38 24 PASS fetching url:"https://127.0.0.1:9443/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=https://localhost:9443&ACACredentials=true" mode:"cors" credentials:"include" should succeed. 39 25 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should succeed. … … 46 32 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should succeed. 47 33 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should succeed. 48 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 49 [native code] 50 }" ("TypeError") 51 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 52 [native code] 53 }" ("TypeError") 54 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 55 [native code] 56 }" ("TypeError") 34 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. 35 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. 36 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail. 57 37 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed. 58 38 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed. … … 70 50 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"same-origin" should succeed. 71 51 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"include" should succeed. 72 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 73 [native code] 74 }" ("TypeError") 75 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 76 [native code] 77 }" ("TypeError") 78 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 79 [native code] 80 }" ("TypeError") 52 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"omit" should fail. 53 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"same-origin" should fail. 54 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"include" should fail. 81 55 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"no-cors" credentials:"omit" should succeed. 82 56 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"no-cors" credentials:"same-origin" should succeed. … … 85 59 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"same-origin" should succeed. 86 60 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"include" should succeed. 87 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 88 [native code] 89 }" ("TypeError") 90 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 91 [native code] 92 }" ("TypeError") 93 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 94 [native code] 95 }" ("TypeError") 96 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 97 [native code] 98 }" ("TypeError") 99 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 100 [native code] 101 }" ("TypeError") 102 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 103 [native code] 104 }" ("TypeError") 105 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 106 [native code] 107 }" ("TypeError") 108 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 109 [native code] 110 }" ("TypeError") 111 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 112 [native code] 113 }" ("TypeError") 114 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 115 [native code] 116 }" ("TypeError") 117 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 118 [native code] 119 }" ("TypeError") 120 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 121 [native code] 122 }" ("TypeError") 123 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 124 [native code] 125 }" ("TypeError") 126 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 127 [native code] 128 }" ("TypeError") 129 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 130 [native code] 131 }" ("TypeError") 132 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 133 [native code] 134 }" ("TypeError") 135 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 136 [native code] 137 }" ("TypeError") 138 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: FetchEvent.respondWith received an error: TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 139 [native code] 140 }" ("TypeError") 141 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 142 [native code] 143 }" ("TypeError") 144 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 145 [native code] 146 }" ("TypeError") 147 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 148 [native code] 149 }" ("TypeError") 61 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. 62 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. 63 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail. 64 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should fail. 65 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should fail. 66 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"include" should fail. 67 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"omit" should fail. 68 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should fail. 69 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should fail. 70 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. 71 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. 72 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail. 73 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should fail. 74 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should fail. 75 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"include" should fail. 76 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"omit" should fail. 77 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should fail. 78 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should fail. 79 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. 80 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. 81 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail. 150 82 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed. 151 83 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed. 152 84 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"include" should succeed. 153 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 154 [native code] 155 }" ("TypeError") 156 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 157 [native code] 158 }" ("TypeError") 159 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 160 [native code] 161 }" ("TypeError") 162 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 163 [native code] 164 }" ("TypeError") 165 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 166 [native code] 167 }" ("TypeError") 168 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 169 [native code] 170 }" ("TypeError") 85 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"omit" should fail. 86 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"same-origin" should fail. 87 PASS url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"include" should fail. 88 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. 89 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. 90 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail. 171 91 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed. 172 92 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed. 173 93 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"include" should succeed. 174 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 175 [native code] 176 }" ("TypeError") 177 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 178 [native code] 179 }" ("TypeError") 180 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque" ("TypeError") expected instance of function "function TypeError() { 181 [native code] 182 }" ("TypeError") 94 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"omit" should fail. 95 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"same-origin" should fail. 96 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"include" should fail. 183 97 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. assert_unreached: Should have rejected: undefined Reached unreachable code 184 98 FAIL url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. assert_unreached: Should have rejected: undefined Reached unreachable code … … 190 104 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"cors" credentials:"same-origin" should succeed. 191 105 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"cors" credentials:"include" should succeed. 192 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 193 [native code] 194 }" ("TypeError") 195 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 196 [native code] 197 }" ("TypeError") 198 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 199 [native code] 200 }" ("TypeError") 106 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. 107 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. 108 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail. 201 109 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed. 202 110 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed. … … 214 122 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"cors" credentials:"same-origin" should succeed. 215 123 PASS fetching url:"https://localhost:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"cors" credentials:"include" should succeed. 216 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"omit" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 217 [native code] 218 }" ("TypeError") 219 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"same-origin" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 220 [native code] 221 }" ("TypeError") 222 FAIL url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"include" should fail. promise_rejects_js: function "function () { throw e }" threw object "TypeError: Cross origin requests are not allowed when using same-origin fetch mode." ("TypeError") expected instance of function "function TypeError() { 223 [native code] 224 }" ("TypeError") 124 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"omit" should fail. 125 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"same-origin" should fail. 126 PASS url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"include" should fail. 225 127 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"no-cors" credentials:"omit" should succeed. 226 128 PASS fetching url:"https://127.0.0.1:9443/?url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"no-cors" credentials:"same-origin" should succeed. -
trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/redirected-response.https-expected.txt
r267647 r269227 7 7 PASS mode: "follow", no mode change, no server redirect 8 8 PASS mode: "follow", no mode change 9 FAIL mode: "error", mode change: "follow" promise_rejects_js: The redirected response from the service worker should be treated as an error when the redirect flag of request was 'error'. function "function () { throw e }" threw object "TypeError: Response served by service worker has redirections" ("TypeError") expected instance of function "function TypeError() { 10 [native code] 11 }" ("TypeError") 12 FAIL mode: "manual", mode change: "follow" promise_rejects_js: The redirected response from the service worker should be treated as an error when the redirect flag of request was 'manual'. function "function () { throw e }" threw object "TypeError: Response served by service worker has redirections" ("TypeError") expected instance of function "function TypeError() { 13 [native code] 14 }" ("TypeError") 15 FAIL mode: "follow", mode change: "manual" promise_rejects_js: The opaqueredirect response from the service worker should be treated as an error when the redirect flag of request was 'follow'. function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque redirect" ("TypeError") expected instance of function "function TypeError() { 16 [native code] 17 }" ("TypeError") 18 FAIL mode: "error", mode change: "manual" promise_rejects_js: The opaqueredirect response from the service worker should be treated as an error when the redirect flag of request was 'error'. function "function () { throw e }" threw object "TypeError: Response served by service worker is opaque redirect" ("TypeError") expected instance of function "function TypeError() { 19 [native code] 20 }" ("TypeError") 9 PASS mode: "error", mode change: "follow" 10 PASS mode: "manual", mode change: "follow" 11 PASS mode: "follow", mode change: "manual" 12 PASS mode: "error", mode change: "manual" 21 13 PASS mode: "manual", no mode change 22 14 PASS mode: "follow", generated redirect response 23 FAIL mode: "error", generated redirect response promise_rejects_js: The generated redirect response from the service worker should be treated as an error when the redirect flag of request was 'error'. function "function () { throw e }" threw object "TypeError: Not allowed to follow a redirection while loading https://localhost:9443/service-workers/service-worker/dummy?url=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fsimple.txt%3F&original-redirect-mode=error&sw=gen" ("TypeError") expected instance of function "function TypeError() { 24 [native code] 25 }" ("TypeError") 15 PASS mode: "error", generated redirect response 26 16 PASS mode: "manual", generated redirect response 27 17 PASS Fetch should follow the redirect response 20 times 28 FAIL Fetch should not follow the redirect response 21 times. promise_rejects_js: Fetch should not follow the redirect response 21 times. function "function () { throw e }" threw object "TypeError: Too many redirections" ("TypeError") expected instance of function "function TypeError() { 29 [native code] 30 }" ("TypeError") 18 PASS Fetch should not follow the redirect response 21 times. 31 19 PASS The URL for the service worker redirected request should be propagated to response. 32 20 PASS restore global state (service worker registration) -
trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/promise-methods-after-discard-expected.txt
r269133 r269227 1 1 2 FAIL suspend() promise_rejects_dom: function "function () { throw e }" threw an exception from the wrong global 3 FAIL resume() promise_rejects_dom: function "function () { throw e }" threw an exception from the wrong global 4 FAIL close() promise_rejects_dom: function "function () { throw e }" threw an exception from the wrong global 2 PASS suspend() 3 PASS resume() 4 PASS close() 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-offlineaudiocontext-interface/startrendering-after-discard-expected.txt
r269133 r269227 1 1 2 FAIL startRendering() promise_rejects_dom: function "function () { throw e }" threw an exception from the wrong global 2 PASS startRendering() 3 3 -
trunk/LayoutTests/requestidlecallback/requestidlecallback-document-gc-expected.txt
r251924 r269227 4 4 5 5 6 PASS initialCount + frameCount / 2 > internals.numberOfLiveDocuments() istrue6 PASS enoughDocumentCollected() became true 7 7 PASS successfullyParsed is true 8 8 -
trunk/LayoutTests/requestidlecallback/requestidlecallback-document-gc.html
r251944 r269227 17 17 } 18 18 19 function enoughDocumentCollected() 20 { 21 return initialCount + frameCount / 2 > internals.numberOfLiveDocuments(); 22 } 23 19 24 function runTest() { 20 25 window.initialCount = internals.numberOfLiveDocuments(); … … 26 31 } 27 32 document.querySelectorAll('iframe').forEach((frame) => frame.remove()); 28 set Timeout(() => {33 setInterval(() => { 29 34 GCController.collect(); 30 shouldBeTrue('initialCount + frameCount / 2 > internals.numberOfLiveDocuments()'); 31 finishJSTest(); 32 }, 0); 35 }, 10); 36 shouldBecomeEqual("enoughDocumentCollected()", "true", finishJSTest); 33 37 } 34 38 -
trunk/Source/WebCore/ChangeLog
r269225 r269227 1 2020-10-31 Chris Dumez <cdumez@apple.com> 2 3 Promises returned by our DOM API have the caller's global instead of the callee's 4 https://bugs.webkit.org/show_bug.cgi?id=218363 5 6 Reviewed by Darin Adler and Ryosuke Niwa. 7 8 Promises returned by our DOM APIs were using the caller's global instead of the 9 callee's global. This behavior was inconsistent with Chrome and Firefox, and was 10 causing failures in web-platform-tests. Because the global of the promise was 11 wrong, the global of the values passed when settling the promise (e.g. the global 12 of the exception used to reject a promise) was also wrong. This patch fixes this. 13 14 After fixing the global of DOM promises, some tests started failing because they 15 expect the promises coming from subframes to still get settled *after* their 16 iframe has been removed from the document. Such promises get settled properly 17 in Firefox and Chrome. They also used to settle properly in WebKit because we 18 were incorrectly using the caller's global. The issue was that after an iframe 19 gets detached, Document::stopActiveDOMObjects() would get called, which would 20 stop the EventLoopTaskGroup associated with the document and clear all pending 21 tasks from this group in the event loop. To address this, when a 22 Document::stopActiveDOMObjects(), we now mark the Document's EventLoopTaskGroup 23 as "ready to stop" instead of stopping it. Only once ALL groups in the EventLoop 24 are ready to stop, do we actually stop all those groups. This is important 25 because each document has its own group but all documents of similar origins 26 share the same EventLoop. 27 28 Tests: fast/js-promise-from-detached-iframe.html 29 http/tests/eventloop/promise-from-cross-origin-detached-iframe.html 30 webaudio/promise-global-object.html 31 32 * bindings/js/JSDOMPromiseDeferred.h: 33 (WebCore::DeferredPromise::shouldIgnoreRequestToFulfill const): 34 (WebCore::callPromiseFunction): 35 * dom/Document.cpp: 36 (WebCore::Document::stopActiveDOMObjects): 37 (WebCore::Document::eventLoop): 38 * dom/EventLoop.cpp: 39 (WebCore::EventLoop::registerGroup): 40 (WebCore::EventLoop::unregisterGroup): 41 (WebCore::EventLoop::stopAssociatedGroupsIfNecessary): 42 * dom/EventLoop.h: 43 (WebCore::EventLoopTaskGroup::EventLoopTaskGroup): 44 (WebCore::EventLoopTaskGroup::~EventLoopTaskGroup): 45 (WebCore::EventLoopTaskGroup::isReadyToStop const): 46 (WebCore::EventLoopTaskGroup::markAsReadyToStop): 47 (WebCore::EventLoopTaskGroup::stopAndDiscardAllTasks): 48 * workers/WorkerOrWorkletGlobalScope.cpp: 49 (WebCore::WorkerOrWorkletGlobalScope::prepareForDestruction): 50 1 51 2020-10-31 Zalan Bujtas <zalan@apple.com> 2 52 -
trunk/Source/WebCore/bindings/js/JSDOMPromiseDeferred.h
r266142 r269227 177 177 } 178 178 179 bool shouldIgnoreRequestToFulfill() const { return isEmpty() || activeDOMObjectAreStopped(); }179 bool shouldIgnoreRequestToFulfill() const { return isEmpty(); } 180 180 181 181 JSC::JSPromise* deferred() const { return guarded(); } … … 315 315 auto catchScope = DECLARE_CATCH_SCOPE(vm); 316 316 317 auto& globalObject = callerGlobalObject(lexicalGlobalObject, callFrame);317 auto& globalObject = *JSC::jsSecureCast<JSDOMGlobalObject*>(vm, &lexicalGlobalObject); 318 318 auto* promise = JSC::JSPromise::create(vm, globalObject.promiseStructure()); 319 319 ASSERT(promise); … … 334 334 auto catchScope = DECLARE_CATCH_SCOPE(vm); 335 335 336 auto& globalObject = callerGlobalObject(lexicalGlobalObject, callFrame);336 auto& globalObject = *JSC::jsSecureCast<JSDOMGlobalObject*>(vm, &lexicalGlobalObject); 337 337 auto* promise = JSC::JSPromise::create(vm, globalObject.promiseStructure()); 338 338 ASSERT(promise); -
trunk/Source/WebCore/dom/ActiveDOMObject.cpp
r259252 r269227 154 154 } 155 155 156 void execute() final { m_target->dispatchEvent(m_event.get()); } 156 void execute() final 157 { 158 // If this task executes after the script execution context has been stopped, don't 159 // actually dispatch the event. 160 if (m_object.isAllowedToRunScript()) 161 m_target->dispatchEvent(m_event.get()); 162 } 157 163 158 164 private: -
trunk/Source/WebCore/dom/Document.cpp
r269027 r269227 2713 2713 { 2714 2714 if (m_documentTaskGroup) 2715 m_documentTaskGroup-> stopAndDiscardAllTasks();2715 m_documentTaskGroup->markAsReadyToStop(); 2716 2716 ScriptExecutionContext::stopActiveDOMObjects(); 2717 2717 platformSuspendOrStopActiveDOMObjects(); … … 6371 6371 m_documentTaskGroup = makeUnique<EventLoopTaskGroup>(windowEventLoop()); 6372 6372 if (activeDOMObjectsAreStopped()) 6373 m_documentTaskGroup-> stopAndDiscardAllTasks();6373 m_documentTaskGroup->markAsReadyToStop(); 6374 6374 else if (activeDOMObjectsAreSuspended()) 6375 6375 m_documentTaskGroup->suspend(); -
trunk/Source/WebCore/dom/EmptyScriptExecutionContext.h
r268868 r269227 110 110 } 111 111 112 void scheduleToRun() final { ASSERT_NOT_REACHED(); } ;113 bool isContextThread() const final { return false; };112 void scheduleToRun() final { ASSERT_NOT_REACHED(); } 113 bool isContextThread() const final { return true; } 114 114 115 115 MicrotaskQueue m_queue; -
trunk/Source/WebCore/dom/EventLoop.cpp
r253091 r269227 58 58 return; 59 59 scheduleToRunIfNeeded(); 60 } 61 62 void EventLoop::registerGroup(EventLoopTaskGroup& group) 63 { 64 ASSERT(isContextThread()); 65 m_associatedGroups.add(group); 66 } 67 68 void EventLoop::unregisterGroup(EventLoopTaskGroup& group) 69 { 70 ASSERT(isContextThread()); 71 if (m_associatedGroups.remove(group)) 72 stopAssociatedGroupsIfNecessary(); 73 } 74 75 void EventLoop::stopAssociatedGroupsIfNecessary() 76 { 77 ASSERT(isContextThread()); 78 for (auto& group : m_associatedGroups) { 79 if (!group.isReadyToStop()) 80 return; 81 } 82 auto associatedGroups = std::exchange(m_associatedGroups, { }); 83 for (auto& group : associatedGroups) 84 group.stopAndDiscardAllTasks(); 60 85 } 61 86 -
trunk/Source/WebCore/dom/EventLoop.h
r253265 r269227 80 80 void stopGroup(EventLoopTaskGroup&); 81 81 82 void registerGroup(EventLoopTaskGroup&); 83 void unregisterGroup(EventLoopTaskGroup&); 84 void stopAssociatedGroupsIfNecessary(); 85 82 86 protected: 83 87 EventLoop() = default; … … 92 96 // Use a global queue instead of multiple task queues since HTML5 spec allows UA to pick arbitrary queue. 93 97 Vector<std::unique_ptr<EventLoopTask>> m_tasks; 98 WeakHashSet<EventLoopTaskGroup> m_associatedGroups; 94 99 WeakHashSet<EventLoopTaskGroup> m_groupsWithSuspenedTasks; 95 100 bool m_isScheduledToRun { false }; … … 104 109 : m_eventLoop(makeWeakPtr(eventLoop)) 105 110 { 111 eventLoop.registerGroup(*this); 112 } 113 114 ~EventLoopTaskGroup() 115 { 116 if (auto* eventLoop = m_eventLoop.get()) 117 eventLoop->unregisterGroup(*this); 106 118 } 107 119 … … 118 130 } 119 131 132 // Marks the group as ready to stop but it won't actually be stopped 133 // until all groups in this event loop are ready to stop. 134 void markAsReadyToStop() 135 { 136 if (isReadyToStop()) 137 return; 138 139 m_state = State::ReadyToStop; 140 if (auto* eventLoop = m_eventLoop.get()) 141 eventLoop->stopAssociatedGroupsIfNecessary(); 142 } 143 144 // This gets called by the event loop when all groups in the EventLoop as ready to stop. 120 145 void stopAndDiscardAllTasks() 121 146 { 147 ASSERT(isReadyToStop()); 122 148 m_state = State::Stopped; 123 149 if (auto* eventLoop = m_eventLoop.get()) … … 127 153 void suspend() 128 154 { 129 ASSERT(m_state != State::Stopped); 155 ASSERT(!isStoppedPermanently()); 156 ASSERT(!isReadyToStop()); 130 157 m_state = State::Suspended; 131 158 // We don't remove suspended tasks to preserve the ordering. … … 135 162 void resume() 136 163 { 137 ASSERT(m_state != State::Stopped); 164 ASSERT(!isStoppedPermanently()); 165 ASSERT(!isReadyToStop()); 138 166 m_state = State::Running; 139 167 if (auto* eventLoop = m_eventLoop.get()) … … 143 171 bool isStoppedPermanently() { return m_state == State::Stopped; } 144 172 bool isSuspended() { return m_state == State::Suspended; } 173 bool isReadyToStop() const { return m_state == State::ReadyToStop; } 145 174 146 175 void queueTask(std::unique_ptr<EventLoopTask>&&); … … 155 184 156 185 private: 157 enum class State : uint8_t { Running, Suspended, Stopped };186 enum class State : uint8_t { Running, Suspended, ReadyToStop, Stopped }; 158 187 159 188 WeakPtr<EventLoop> m_eventLoop; -
trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.cpp
r268900 r269227 49 49 void WorkerOrWorkletGlobalScope::prepareForDestruction() 50 50 { 51 if (m_defaultTaskGroup) 52 m_defaultTaskGroup->stopAndDiscardAllTasks(); 51 if (m_defaultTaskGroup) { 52 m_defaultTaskGroup->markAsReadyToStop(); 53 ASSERT(m_defaultTaskGroup->isStoppedPermanently()); 54 } 53 55 54 56 stopActiveDOMObjects();
Note: See TracChangeset
for help on using the changeset viewer.