Enable multiple WorkerFetchContext per one global scope
Currently WorkerFetchContext has the ownership of some objects originated from WebWorkerFetchContext. To create multiple WorkerFetchContexts for one WorkerOrWorkletGlobalScope/WebWorkerFetchContext, this CL moves these ownership outside WorkerFetchContext. Namely, - url_loader_factory_ and script_loader_factory_ from WorkerFetchContext to WebWorketFetchContext subclasses, and - subresource_filter_ from WorkerFetchContext to WorkerOrWorkletGlobalScope. Still |WorkerFetchContext::subresource_filter_| is kept, but it is created in WorkerOrWorkletGlobalScope and passed to WorkerFetchContext. This CL doesn't change the observable behavior. This CL creates WebURLLoaderFactory a little more eagerly, i.e. when WorkerFetchContext is created, while previously it was created when WorkerFetchContext::CreateURLLoader() is called for the first time. Bug: 880027, 903579 Change-Id: I84a8bafee25b7f293201a271d198260e2dfb8e68 Reviewed-on: https://chromium-review.googlesource.com/c/1193385 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:Tsuyoshi Horo <horo@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#606835}
Showing
Please register or sign in to comment