Changeset 292907 in webkit
- Timestamp:
- Apr 15, 2022, 8:12:14 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/loader/DocumentLoader.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r292906 r292907 1 2022-04-15 Youenn Fablet <youenn@apple.com> 2 3 Sandboxed iframe loads should match a service worker registration based on sandbox flags 4 https://bugs.webkit.org/show_bug.cgi?id=239379 5 6 Reviewed by Chris Dumez. 7 8 * TestExpectations: 9 1 10 2022-04-15 Rob Buis <rbuis@igalia.com> 2 11 -
trunk/LayoutTests/TestExpectations
r292906 r292907 381 381 382 382 # Skip service worker tests that are timing out. 383 imported/w3c/web-platform-tests/service-workers/service-worker/sandboxed-iframe-fetch-event.https.html [ Skip ]384 383 imported/w3c/web-platform-tests/service-workers/service-worker/update-bytecheck.https.html [ Skip ] 385 384 imported/w3c/web-platform-tests/service-workers/service-worker/clients-matchall-include-uncontrolled.https.html [ Skip ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r292906 r292907 1 2022-04-15 Youenn Fablet <youenn@apple.com> 2 3 Sandboxed iframe loads should match a service worker registration based on sandbox flags 4 https://bugs.webkit.org/show_bug.cgi?id=239379 5 6 Reviewed by Chris Dumez. 7 8 * web-platform-tests/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt: Added. 9 1 10 2022-04-15 Rob Buis <rbuis@igalia.com> 2 11 -
trunk/Source/WebCore/ChangeLog
r292905 r292907 1 2022-04-15 Youenn Fablet <youenn@apple.com> 2 3 Sandboxed iframe loads should match a service worker registration based on sandbox flags 4 https://bugs.webkit.org/show_bug.cgi?id=239379 5 6 Reviewed by Chris Dumez. 7 8 Coverdd by updated tests. 9 10 * loader/DocumentLoader.cpp: 11 Sandboxed iframes have a null origin and should not be intercepted by service workers. 12 1 13 2022-04-15 Youenn Fablet <youenn@apple.com> 2 14 -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r292905 r292907 2117 2117 } 2118 2118 2119 static bool isSandboxingAllowingServiceWorkerFetchHandling(SandboxFlags flags) 2120 { 2121 return !(flags & SandboxOrigin) && !(flags & SandboxScripts); 2122 } 2123 2119 2124 void DocumentLoader::loadMainResource(ResourceRequest&& request) 2120 2125 { … … 2135 2140 #if ENABLE(SERVICE_WORKER) 2136 2141 if (m_frame && m_frame->settings().serviceWorkersEnabled()) { 2137 // The main navigation load will trigger the registration of the client. 2138 if (m_resultingClientId) 2139 scriptExecutionContextIdentifierToLoaderMap().remove(m_resultingClientId); 2140 m_resultingClientId = ScriptExecutionContextIdentifier::generate(); 2141 ASSERT(!scriptExecutionContextIdentifierToLoaderMap().contains(m_resultingClientId)); 2142 scriptExecutionContextIdentifierToLoaderMap().add(m_resultingClientId, this); 2143 mainResourceLoadOptions.clientIdentifier = m_resultingClientId; 2142 if (!isSandboxingAllowingServiceWorkerFetchHandling(frameLoader()->effectiveSandboxFlags())) 2143 mainResourceLoadOptions.serviceWorkersMode = ServiceWorkersMode::None; 2144 else { 2145 // The main navigation load will trigger the registration of the client. 2146 if (m_resultingClientId) 2147 scriptExecutionContextIdentifierToLoaderMap().remove(m_resultingClientId); 2148 m_resultingClientId = ScriptExecutionContextIdentifier::generate(); 2149 ASSERT(!scriptExecutionContextIdentifierToLoaderMap().contains(m_resultingClientId)); 2150 scriptExecutionContextIdentifierToLoaderMap().add(m_resultingClientId, this); 2151 mainResourceLoadOptions.clientIdentifier = m_resultingClientId; 2152 } 2144 2153 } 2145 2154 #endif
Note:
See TracChangeset
for help on using the changeset viewer.