Commit 9d89263
ServiceWorkerThreadProxy should set the correct cookie and cache partitioning options
https://bugs.webkit.org/show_bug.cgi?id=181000
Patch by Youenn Fablet <youenn@apple.com> on 2017-12-21
Reviewed by Chris Dumez.
LayoutTests/imported/w3c:
* web-platform-tests/service-workers/service-worker/fetch-response-taint.https-expected.txt:
Source/WebCore:
Covered by rebased test.
Add a way to set the domain for cache partition explicitly on a ScriptExecutionContext.
This is used by ServiceWorkerThreadProxy document to mimick the fact that it may be
a service worker used by iframes that have a cross origin top document.
Updated code to use that new utility routine.
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::domainForCachePartition const):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::setDomainForCachePartition):
* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL):
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setDomainForCachePartition):
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache):
* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::topOriginURL):
(WebCore::createPageForServiceWorker):
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
* workers/service/context/ServiceWorkerThreadProxy.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
Source/WebKit:
Update Service Worker WebPreferencesStore based on the first web page added.
This allows having the right storage blocking policy.
Storing that policy in the context manager to set it properly when
creating a new service worker thread proxy.
Set up correctly partitioning parameters in the dummy Document used by the service worker.
* UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::updatePreferencesStore):
* UIProcess/ServiceWorkerProcessProxy.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
(WebKit::WebProcessPool::pageAddedToProcess):
* UIProcess/WebProcessPool.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getAuthenticationInfo):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::updatePreferencesStore):
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:
Source/WebKitLegacy/mac:
* Misc/WebCache.mm:
(+[WebCache addImageToCache:forURL:forFrame:]):
Canonical link: https://commits.webkit.org/196981@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226257 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent a565846 commit 9d89263
28 files changed
Lines changed: 207 additions & 67 deletions
File tree
- LayoutTests/imported/w3c
- web-platform-tests/service-workers/service-worker
- Source
- WebCore
- Modules/websockets
- dom
- html
- inspector/agents
- loader
- archive/cf
- cache
- testing
- workers/service/context
- xml
- WebKitLegacy/mac
- Misc
- WebKit
- UIProcess
- WebProcess
- Plugins
- Storage
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | 11 | | |
3 | 12 | | |
| |||
Lines changed: 37 additions & 37 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
1 | 42 | | |
2 | 43 | | |
3 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
527 | 532 | | |
528 | 533 | | |
529 | 534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
323 | 326 | | |
324 | 327 | | |
325 | 328 | | |
| 329 | + | |
| 330 | + | |
326 | 331 | | |
327 | 332 | | |
328 | 333 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1277 | 1277 | | |
1278 | 1278 | | |
1279 | 1279 | | |
1280 | | - | |
| 1280 | + | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
| |||
0 commit comments