Fix crash in ServiceWorkerRegistrationHandle
Before this patch, when register() fails to install a worker, it would result in ServiceWorkerRegistrationHandle::OnRegisterFailed nulling out its reference to the registration in order to allow the registration to die. This was flawed for two reasons: - When the handle is destructed, it would dereference the null pointer. - SWRegistrationHandle is responsible for listening for ref count changes from Blink-side about the corresponding JavaScript ServiceWorkerRegistration object. It's a weird state for Handle to forget about the Chromium-side registration while Blink-side is alive. The Chromium-side Registration lifetime should be tied to Blink's. BUG=384119, 396400 Review URL: https://codereview.chromium.org/461233004 Cr-Commit-Position: refs/heads/master@{#289597} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289597 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment