commit | 67552628b0942f484ddd8e09a831812396a1019c | [log] [tgz] |
---|---|---|
author | Hiroshige Hayashizaki <hiroshige@chromium.org> | Wed Dec 05 00:32:29 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Dec 05 00:32:29 2018 |
tree | 6a47e301ab48d6e3853fbdb1212501775a4a4516 | |
parent | 4f03013104e9848b0c0d6ca0c0fdbd2c30410395 [diff] |
Switch top-level module worker fetch to use outsideSettings ResourceFetcher Before this CL, module loading uses the combination of - a spec-conformant FetchClientSettingsObject (FCSO) (either insideSettings or outsideSettings) that is passed explicitly, and - a single ResourceFetcher (insideSettings-ish thing) that is tied with ExecutionContext, to implement off-the-main-thread top-level fetch. However, module loading potentially used another insideSettings FCSO behind the ResourceFetcher in some cases, which was not spec conformant in off-the-main-thread fetch. Also, sharing the single ResourceFetcher makes it harder to distinguish insideSettings and outsideSettings fetches further. This CL - Creates a new outsideSettings ResourceFetcher/FetchContext which has the outsideSettings FCSO behind it for each invocation of off-the-main-thread top-level module worker script fetch in WorkerOrWorkletGlobalScope::FetchModuleScript(), and - Plumbs ResourceFetcher (and FetchContext/FCSO behind that) in core/loader/modulescript instead of directly plumbing FCSO. After this CL, - FCSO used in module loading is always the outsideSettings FCSO behind the outsideSettings ResourceFetcher. In most cases this doesn't affect the behavior though, because - insideSettings and outsideSettings are so similar that the difference isn't caught by the tests, and - Where the difference can be observable, the explicitly given outsideSettings FCSO is already used (e.g. for SecurityOrigin, referrer and referrer policy). - We have different ResourceFetcher/FetchContext objects for insideSettings and outsideSettings fetches. Currently their behaviors are the same (except for FCSO), but eventually we can further differentiate insideSettings and outsideSettings fetches and thus improve the spec conformance, by setting different data/behavior to each ResourceFetcher/FetchContext. Bug: 880027 Change-Id: I740ffe3691c7e5213c610f1ab71bd1fc8fd853f6 Reviewed-on: https://chromium-review.googlesource.com/c/1328164 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#613783}
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 .