S13nSW: GetControllerServiceWorkerPtr() doesn't ensure the controller is running
The method is similar to EnsureControllerServiceWorker but in some cases we can't make sure that the controller service worker is running (as existing comment described). Update the description of the method to state that this method doesn't guarantee that the controller is running. The method will be called during navigation when S13nSW is enabled. During navigation, we need to make sure that the controller is running before calling this method. Currently we make sure this by calling ServiceWorkerFetchDispatcher::StartWorker() in the following sequence: ServiceWorkerControlleeRequestHandler::MaybeCreateLoader() -> ServiceWorkerURLJobWrapper::ForwardToServiceWorker() -> ServiceWorkerNavigationLoader::ForwardToServiceWorker() -> ServiceWorkerFetchDispatcher::Run() -> ServiceWorkerFetchDispatcher::StartWorker() After creating a loader, we call GetControllerServiceWorkerPtr() in ServiceWorkerControlleeReuqestHandler::MaybeCreateSubresourceLoaderParams(). Bug: 797222 Change-Id: If7ef6dbe2e59c15e2f737f16d68f0c851d889556 Reviewed-on: https://chromium-review.googlesource.com/987832Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Matt Falkenhagen <falken@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#547634}
Showing
Please register or sign in to comment