Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Issue 1327723005: Fix crash during EmbeddedWorkerInstance startup sequence failures (Closed)

Created:
5 years, 3 months ago by falken
Modified:
4 years, 9 months ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+serviceworker, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix crash during EmbeddedWorkerInstance startup sequence failures Once EWInstance startup calls the callback, it's possible that the underlying ServiceWorkerVersion is destroyed, hence destroying |this|. We must guard against that. Also some failure points in the startup sequence weren't calling OnStopped() as expected. BUG=529520, 531345 Committed: https://crrev.com/37b83877e63f62f8aebb337494f1116539182bdf Cr-Commit-Position: refs/heads/master@{#349368}

Patch Set 1 #

Patch Set 2 : added unittests #

Total comments: 4

Patch Set 3 : comments #

Patch Set 4 : fix asan #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -19 lines) Patch
M content/browser/service_worker/embedded_worker_instance.h View 1 2 1 chunk +6 lines, -0 lines 1 comment Download
M content/browser/service_worker/embedded_worker_instance.cc View 1 2 6 chunks +19 lines, -10 lines 2 comments Download
M content/browser/service_worker/embedded_worker_instance_unittest.cc View 1 2 3 6 chunks +77 lines, -9 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
falken
This is a sneak preview of a patch... I still need to add unittests. But ...
5 years, 3 months ago (2015-09-09 09:56:24 UTC) #2
falken
Added unittests PTAL
5 years, 3 months ago (2015-09-10 10:35:25 UTC) #3
kinuko (google)
looking good (will take another look later) https://codereview.chromium.org/1327723005/diff/20001/content/browser/service_worker/embedded_worker_instance_unittest.cc File content/browser/service_worker/embedded_worker_instance_unittest.cc (right): https://codereview.chromium.org/1327723005/diff/20001/content/browser/service_worker/embedded_worker_instance_unittest.cc#newcode25 content/browser/service_worker/embedded_worker_instance_unittest.cc:25: // cannot ...
5 years, 3 months ago (2015-09-10 22:14:19 UTC) #5
nhiroki
https://codereview.chromium.org/1327723005/diff/20001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/1327723005/diff/20001/content/browser/service_worker/embedded_worker_instance.cc#newcode319 content/browser/service_worker/embedded_worker_instance.cc:319: // already been called. The following code might work? ...
5 years, 3 months ago (2015-09-11 04:33:02 UTC) #6
falken
Thanks, PTAL. https://codereview.chromium.org/1327723005/diff/20001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/1327723005/diff/20001/content/browser/service_worker/embedded_worker_instance.cc#newcode319 content/browser/service_worker/embedded_worker_instance.cc:319: // already been called. On 2015/09/11 04:33:02, ...
5 years, 3 months ago (2015-09-11 09:48:17 UTC) #7
nhiroki
lgtm
5 years, 3 months ago (2015-09-12 23:55:31 UTC) #8
kinuko
lgtm https://codereview.chromium.org/1327723005/diff/60001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/1327723005/diff/60001/content/browser/service_worker/embedded_worker_instance.cc#newcode513 content/browser/service_worker/embedded_worker_instance.cc:513: OnStopped(old_status)); nit: would be better to update the ...
5 years, 3 months ago (2015-09-13 08:41:12 UTC) #9
nhiroki
> Also some failure points in the startup sequence weren't calling > OnStopped() as expected. ...
5 years, 3 months ago (2015-09-17 06:14:13 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1327723005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1327723005/60001
5 years, 3 months ago (2015-09-17 06:15:16 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 3 months ago (2015-09-17 07:14:09 UTC) #13
commit-bot: I haz the power
5 years, 3 months ago (2015-09-17 07:15:25 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/37b83877e63f62f8aebb337494f1116539182bdf
Cr-Commit-Position: refs/heads/master@{#349368}

Powered by Google App Engine
This is Rietveld 408576698