commit | 86029dbfbf1c4927e12c8f8b09de04d706553472 | [log] [tgz] |
---|---|---|
author | Han Leon <leon.han@intel.com> | Wed Nov 15 03:07:51 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Nov 15 03:07:51 2017 |
tree | bd8c2c72c3f974801038c5da3dec77148c27b551 | |
parent | 2a3bd61db1692f5e093ca91dd0a498d017e47b71 [diff] |
[ServiceWorker] Eliminate blink.mojom.ServiceWorkerRegistrationObjectInfo.handle_id This CL stops passing registration handle id from the browser process to the renderer process. Before this CL, the renderer process uses the registration handle id to differentiate a service worker registration entity against multiple JavaScript execution contexts for service worker clients or service worker itself, by managing the mapping between registration handle id and JavaScript registration object in each thread-specific instance of ServiceWorkerDispatcher. However, as the registration handle id is actually an unique identifier of the (provider_id, registration_id) pair, this CL makes the renderer process manage the mapping between registration id and JavaScript registration object in each provider-specific instance of ServiceWorkerProviderContext for all JavaScript execution contexts. Thus, we do not need to pass the registration handle id in blink.mojom.ServiceWorkerRegistrationObjectInfo anymore. Also, we found that we do not need to manage the mapping for service worker execution context itself, because ServiceWorkerGlobalScope#registration is just set once immediately after the service worker thread started and will never change later. So this CL only manages the mapping for service worker client contexts. Follow-up CLs will rename ServiceWorkerRegistrationHandle class to ServiceWorkerRegistrationObjectHost, and then manage them per ServiceWorkerProviderHost instead of per ServiceWorkerDispatcherHost. BUG=769236 TEST=content_unittests --gtest_filter=ServiceWorkerProviderContextTest.* Change-Id: Ic9c68565bcb05d6bc40e9f6380bdfe66ab1577cb Reviewed-on: https://chromium-review.googlesource.com/748907 Commit-Queue: Han Leon <leon.han@intel.com> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Reviewed-by: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#516578}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .