| Index: content/browser/devtools/protocol/service_worker_handler.cc
|
| diff --git a/content/browser/devtools/protocol/service_worker_handler.cc b/content/browser/devtools/protocol/service_worker_handler.cc
|
| index 242d33e6d9beb955a9e7f113594da5a9daf7bf02..31abe59123ef756bb78ebc6a46301d09ec6a0fa9 100644
|
| --- a/content/browser/devtools/protocol/service_worker_handler.cc
|
| +++ b/content/browser/devtools/protocol/service_worker_handler.cc
|
| @@ -371,10 +371,13 @@ void ServiceWorkerHandler::OnWorkerVersionUpdated(
|
| protocol::Array<std::string>::create();
|
| for (const auto& client : version.clients) {
|
| if (client.second.type == SERVICE_WORKER_PROVIDER_FOR_WINDOW) {
|
| - RenderFrameHostImpl* render_frame_host = RenderFrameHostImpl::FromID(
|
| - client.second.process_id, client.second.route_id);
|
| + // PlzNavigate: a navigation may not yet be associated with a
|
| + // RenderFrameHost. Use the |web_contents_getter| instead.
|
| WebContents* web_contents =
|
| - WebContents::FromRenderFrameHost(render_frame_host);
|
| + client.second.web_contents_getter
|
| + ? client.second.web_contents_getter.Run()
|
| + : WebContents::FromRenderFrameHost(RenderFrameHostImpl::FromID(
|
| + client.second.process_id, client.second.route_id));
|
| // There is a possibility that the frame is already deleted
|
| // because of the thread hopping.
|
| if (!web_contents)
|
|
|