commit | 48ddd7ef64f7fe9d8bc3212d22a3485c609f95ed | [log] [tgz] |
---|---|---|
author | Hiroshige Hayashizaki <hiroshige@chromium.org> | Wed Feb 20 21:21:45 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Feb 20 21:21:45 2019 |
tree | 7493c809f3aadfe0a63b0256bfa3206d270774b5 | |
parent | c289756230bd3c85a5f44f40b218af67d7bf99a5 [diff] |
off-the-main-thread fetch: Use response URL as worker global scope's URL After this CL, WorkerGlobalScope's URL is initially set to the null URL, and later set to the response URL of the top-level script - When the top-level script is loaded, if off-the-main-thread fetch is enabled for the worker, or - Immediately after that during construction, otherwise. This CL adds CHECK()s to catch cases where the URL is accessed before ready. |GlobalScopeCreationParams::script_url| is still used to set the WorkerGlobalScope's SecurityOrigin that should be the same as the response URL's origin. This is ensured by https://chromium-review.googlesource.com/1147664 and this CL adds CHECK()s for this in WorkerGlobalScope::InitializeURL(). Even after this CL, DevTool's context selector will still show request URLs for off-the-main-thread-fetched worker scripts (because WorkerThreadDebugger::ContextCreated() uses |GlobalScopeCreationParams::script_url|) while global scope's Url() is changed to the response URL. This should be handled later in Issue 866666. Bug: 861564, 866666 Change-Id: I304309ca4d7f08a11bb0dc5c0bcb6cc661d3fdba Reviewed-on: https://chromium-review.googlesource.com/c/1139074 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#633878}
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 .