[Reland] Loader: Introduce FetchSettingsClientObject in BaseFetchContext
This is a reland CL for: https://chromium-review.googlesource.com/c/chromium/src/+/1124209 The original CL was reverted because of the random crashes in the WebGL 2.0 conformance tests: https://chromium-review.googlesource.com/c/chromium/src/+/1127420 This was caused by an Oilpan's GC bug happening only on the debug build. That was already fixed by keishi@chromium.org: https://chromium-review.googlesource.com/c/chromium/src/+/1131154 Therefore, this CL changes nothing from the original CL. ===== Original CL description ===== <Overview> This CL introduces FetchSettingsClientObject in BaseFetchContext and replaces some functions of BaseFetchContext with that. This makes the scope of responsibilities of BaseFetchContext clearer. Also, this is a preparation for separating ResourceFetcher for main resource request and subresource requests for workers and worklets. The main resource request needs a snapshot of the fetch client settings object of the parent execution context, while the subresource requests need up-to-date values of the fetch client settings object of the worker / worklet execution context. This change enables a subsequent CL easily to inject the fetch client settings object from externals of WorkerFetchContext. <Technical details> - This CL introduces FetchSettingsClientObject interface and FetchSettingsClientObjectImpl. Also, this makes FetchSettingsClientObjectSnapshot inherit the interface so that BaseFetchContext doesn't have to take care of an actual implementation. - FrameFetchContext has the FrozenState concept that is used for keeping states even after the frame is detached. Similarly, this CL makes FrameFetchContext creates a new instance of FetchSettingsClientObjectSnapshot on frame detach, and replace the current |fetch_client_settings_object_| with that. Bug: 845285 Change-Id: I74b43722002bb07197d718d3f266bbe384636b66 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel TBR: kouhei@chromium.org, kinuko@chromium.org Reviewed-on: https://chromium-review.googlesource.com/1127202Reviewed-by:Hiroki Nakagawa <nhiroki@chromium.org> Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#573983}
Showing
Please register or sign in to comment