Commit d8905bf2 authored by ksakamoto's avatar ksakamoto Committed by Commit bot

Fix crash in ServiceWorkerDispatcherHost

This fixes the browser crash that happens when ServiceWorkerContextCore
has no live registration corresponding to the live version.
This is a quick fix intended to be mergeable.

BUG=459916

Review URL: https://codereview.chromium.org/982743002

Cr-Commit-Position: refs/heads/master@{#319214}
parent f5ac85a3
......@@ -570,6 +570,9 @@ void ServiceWorkerDispatcherHost::OnSetHostedVersionId(
ServiceWorkerRegistration* registration =
GetContext()->GetLiveRegistration(version->registration_id());
DCHECK(registration);
// TODO(ksakamoto): This is a quick fix for crbug.com/459916.
if (!registration)
return;
// Set the document URL to the script url in order to allow
// register/unregister/getRegistration on ServiceWorkerGlobalScope.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment