In workers/worklets, there are two "settings objects" used for fetching:
- inside settings object, corresponding to the worker/worklet global scope, used for subresource fetching in workers, and
- outside settings object, corresponding to parent Document (or parent worker in nested cases), used for top-level worker script fetching.
In off-the-main-thread world, both of these are done in the worker/worklet threads, but currently using a single ResourceFetcher/WorkerFetchContext that behaves sometimes like the inside settings object and sometimes like the outside settings object.
To implement more off-the-main-thread fetch easily, secure and spec-conformant, this issue creates two ResourceFetcher and WorkerFetchContext, one for inside and one for outside settings object, and use correct ResourceFetcher/WorkerFetchContext instead of mixing two behaviors in a single FetchContext.
Design doc to be created.
Comment 1 by hirosh...@chromium.org
, Sep 3Blocking: 878274
Summary: Create separate ResourceFetcher/FetchContexts for inside/outsideSettings (was: Off-the-main-thread-fetch: Create separate ResourceFetcher/FetchContexts for inside/outsideSettings)