PlzNavigate: Fix ServiceWorkerHandler not finding WebContents.
With PlzNavigate, the RenderFrameHost associated with a navigation is known only at commit time. For this reason, in ServiceWorkerHandler::OnWorkerVersionUpdated(), client's process_id(-1) and route_id(-2) are invalid. They will be set to something meaningful as soon as ServiceWorkerProviderHost::FinalizeInitialization will be called with PlzNavigate, but it's too late. The solution with PlzNavigate is to use a WebContentsGetter instead. In this way, there is no need to know the RenderFrameHost. BUG=725818 TEST=http/tests/inspector/service-workers/service-workers-redundant.html CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_browser_side_navigation_rel Review-Url: https://codereview.chromium.org/2917643002 Cr-Commit-Position: refs/heads/master@{#476331}
Showing
Please register or sign in to comment