ServiceWorker: Implements WebSWInstalledScriptsManagerImpl

Desktop / Chromium - Makoto Shimazu [chromium.org] - 13 July 2017 03:17 EDT

This is 5th patch of script streaming project split off from https://chromium-review.googlesource.com/c/538477. Design doc: https://docs.google.com/document/d/1BbETxB2K1GeGUv4XIvGGforAJRRgYSNX5x4vPTGsCPU/edit#heading=h.ubqh39vcdj3n

Internal in web_service_worker_installed_scripts_manager_impl.cc receives installed scripts on the IO thread which are streamed from the browser, and WebServiceWorkerInstalledScriptsManagerImpl provides installed scripts on the worker thread. ThreadSafeScriptContainer is a container shared among them which can be accessed from the IO thread and the worker thread. Also, Receivers and Receiver are implemented for receiving the installed scripts from the browser through Mojo data pipes. After finishing script transfer, Internal stores the received script data to ThreadSafeScriptContainer.

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

8d98fd6 ServiceWorker: Implements WebSWInstalledScriptsManagerImpl
content/renderer/BUILD.gn | 2 +
.../service_worker/thread_safe_script_container.cc | 66 ++++++
.../service_worker/thread_safe_script_container.h | 78 +++++++
.../thread_safe_script_container_unittest.cc | 223 ++++++++++++++++++++
...ervice_worker_installed_scripts_manager_impl.cc | 196 +++++++++++++++--
...service_worker_installed_scripts_manager_impl.h | 10 +-
...rker_installed_scripts_manager_impl_unittest.cc | 233 +++++++++++++++++++++
content/test/BUILD.gn | 2 +
.../WebServiceWorkerInstalledScriptsManager.cpp | 13 ++
.../WebServiceWorkerInstalledScriptsManager.h | 22 +-
10 files changed, 823 insertions(+), 22 deletions(-)

Upstream: git.chromium.org


  • Share