ServiceWorker: script streaming for importScripts

Desktop / Chromium - Makoto Shimazu [chromium.org] - 8 August 2017 20:25 EDT

This is 12th patch of script streaming project. Design doc: https://docs.google.com/document/d/1BbETxB2K1GeGUv4XIvGGforAJRRgYSNX5x4vPTGsCPU/edit

This patch implements importScripts for installed scripts. When the script has already been installed, importScripts firstly asks to an InstalledScriptsManager. If there are two or more importScripts for the same script, it falls back to the ResourceLoader path in this patch though InstalledScriptsManager will take care of it and request the script to the browser in future.

Bug: 683037 Change-Id: I3ad47aa91433afcd8e38e32391a23b70ff993c66 Reviewed-on: https://chromium-review.googlesource.com/590633 Commit-Queue: Makoto Shimazu

105c6a1 ServiceWorker: script streaming for importScripts
...ervice_worker_installed_scripts_manager_impl.cc | 16 ++--
...rker_installed_scripts_manager_impl_unittest.cc | 23 ++---
.../Source/core/workers/InstalledScriptsManager.h | 29 +++++--
.../Source/core/workers/WorkerGlobalScope.cpp | 98 +++++++++++++++++-----
.../WebKit/Source/core/workers/WorkerGlobalScope.h | 27 ++++++
.../WebKit/Source/core/workers/WorkerThread.cpp | 63 ++++++++------
.../ServiceWorkerInstalledScriptsManager.cpp | 13 ++-
.../ServiceWorkerInstalledScriptsManager.h | 3 +-
.../WebServiceWorkerInstalledScriptsManager.cpp | 20 ++++-
.../WebServiceWorkerInstalledScriptsManager.h | 19 ++++-
10 files changed, 226 insertions(+), 85 deletions(-)

Upstream: git.chromium.org


  • Share