Worker: Make worklets' module loading classes reusable for workers
As a preparation for module loading support for workers, this CL does mainly 2 things: - This renames WorkletModuleScriptFetcher to WorkerOrWorkletModuleScriptFetcher, and WorkletModuleResponsesMapProxy to WorkerOrWorkletModuleFetchCoordinatorProxy. This enables workers can reuse worklets' module loading classes. - This introduces WorkerOrWorkletModuleFetchCoordinator interface. Implementation of the interface is expected to fetch module scripts via DocumentModuleScriptFetcher, to manage inflight requests, and to notify completions of the requests to WorkerOrWorkletModuleScriptFetcher on the worker thread. For worklets, WorkletModuleResponsesMap inherits the interface. For workers, following CLs introduce a new class, WorkerModuleFetchCoordinator, because WorkletModuleResponsesMap have custom fetch logic for caching and it's not reusable for workers. See the design doc for details: https://docs.google.com/document/d/1IMGWAK7Wq37mLehwkbysNRBBnhQBo3z2MbYyMkViEnY/edit#heading=h.637avx8i5qtn Bug: 680046 Change-Id: Iba7916bb9b5aefbc8c695ff9865bcbe756801412 Reviewed-on: https://chromium-review.googlesource.com/958801Reviewed-by:Kouhei Ueno <kouhei@chromium.org> Reviewed-by:
Matt Falkenhagen <falken@chromium.org> Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#543026}
Showing
Please register or sign in to comment