commit | 44087d2a719451937cbebaf904d0ca4bcf43fed2 | [log] [tgz] |
---|---|---|
author | Kenichi Ishibashi <bashi@chromium.org> | Thu May 23 23:42:09 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu May 23 23:42:09 2019 |
tree | 9d5dbf1ff7004401df6f770bc0efb64764a9c725 | |
parent | 82d15c0962858c08a3cc09eeb813d63fbd3fcc80 [diff] |
OMT script fetch: Set ID of AppCache after main script load Before this CL, WebSharedWorkerImpl didn't call SelectAppCacheID() after the main script fetch when off-the-main-thread script fetch is enabled. This CL moves the callsite of SelectAppCacheID() to DidFetchScript(). DidFetchScript() is called in both "on" and "off" the main thread script fetch so it will get called in both code paths. For off-the-main-thread script fetch, the appcache ID is plumbed from WorkerClassicScriptLoader in SharedWorkerGlobalScope. Also there could be a potential race between IPC messages for appcache selection and subresource requests if we evaluate the top-level script immediately after script fetch. To avoid the race this CL introduces a callback to SelectAppCacheID(). The callback is invoked when the browser process sends AppCacheFrontend::CacheSelected mojo IPC. SharedWorkerGlobalScope evaluates the top-level script after the callback is invoked. This fixes shared worker related tests in wpt/html/browsers/offline/appcache/workers/appcache-worker.https.html Bug: 945673 Change-Id: I03c965bff166d6265e9a8479745fa7c1ae1a976c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614656 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#662894}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .