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

Issue 1478103002: [WIP] [service worker] Fix detach controller and fallback to network mechanism (Closed)

Created:
5 years ago by falken
Modified:
5 years ago
Reviewers:
nhiroki, horo
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tyoshino+watch_chromium.org, serviceworker-reviews, creis+watch_chromium.org, tzik, nasko+codewatch_chromium.org, jam, nhiroki, loading-reviews+fetch_chromium.org, darin-cc_chromium.org, gavinp+loader_chromium.org, horo+watch_chromium.org, blink-reviews, kinuko+serviceworker, kinuko+watch, Nate Chapin, 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

[service worker] Clear controller when set to invalid handle id We try to escape an unresponsive SW for main resource requests by sending a controller change IPC to the renderer with a kInvalidServiceWorkerHandleId. Before this patch, since we set the controller to an "invalid handle" rather than null, some code still thinks a controller exists, notably DocumentThreadableLoader thinks it has a controller, which eventually causes assert failures. This patch fixes things by setting the controller to null. BUG=561988 Committed: https://crrev.com/f326225e72d172ec369cb7d551f8c8b4b963e4d7 Cr-Commit-Position: refs/heads/master@{#362624}

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix controller #

Total comments: 6

Patch Set 3 : return null in Create/Adopt #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -10 lines) Patch
M content/child/service_worker/service_worker_dispatcher.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/child/service_worker/service_worker_dispatcher_unittest.cc View 1 1 chunk +29 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_handle_reference.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M content/child/service_worker/service_worker_handle_reference.cc View 1 2 4 chunks +9 lines, -7 lines 0 comments Download
M content/child/service_worker/service_worker_provider_context.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
falken
clamy, horo: I'd like to get early feedback on this WIP patch before going too ...
5 years ago (2015-11-26 10:36:42 UTC) #4
falken
It turns out this is more complex than needed. I just have to fix the ...
5 years ago (2015-11-27 09:19:24 UTC) #5
falken
updated patch and CL desc. nhiroki@ can you take a look?
5 years ago (2015-11-27 09:29:23 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1478103002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1478103002/20001
5 years ago (2015-11-27 09:36:58 UTC) #10
nhiroki
Thank you for working on this! https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc File content/child/service_worker/service_worker_dispatcher.cc (right): https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc#newcode693 content/child/service_worker/service_worker_dispatcher.cc:693: provider->second->OnSetControllerServiceWorker(nullptr); How about ...
5 years ago (2015-11-27 09:46:01 UTC) #11
horo
https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc File content/child/service_worker/service_worker_dispatcher.cc (right): https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc#newcode692 content/child/service_worker/service_worker_dispatcher.cc:692: if (info.handle_id == kInvalidServiceWorkerVersionId) Please add comment about when ...
5 years ago (2015-11-27 10:03:26 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-11-27 12:47:56 UTC) #14
falken
Reply only. https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc File content/child/service_worker/service_worker_dispatcher.cc (right): https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc#newcode692 content/child/service_worker/service_worker_dispatcher.cc:692: if (info.handle_id == kInvalidServiceWorkerVersionId) On 2015/11/27 10:03:26, ...
5 years ago (2015-12-01 03:46:06 UTC) #15
falken
https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc File content/child/service_worker/service_worker_dispatcher.cc (right): https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc#newcode692 content/child/service_worker/service_worker_dispatcher.cc:692: if (info.handle_id == kInvalidServiceWorkerVersionId) On 2015/12/01 03:46:06, falken wrote: ...
5 years ago (2015-12-01 05:08:00 UTC) #16
falken
Updated patch as per comments, PTAL.
5 years ago (2015-12-01 07:53:44 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1478103002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1478103002/40001
5 years ago (2015-12-01 07:54:23 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-01 10:45:27 UTC) #21
horo
lgtm https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc File content/child/service_worker/service_worker_dispatcher.cc (right): https://codereview.chromium.org/1478103002/diff/20001/content/child/service_worker/service_worker_dispatcher.cc#newcode692 content/child/service_worker/service_worker_dispatcher.cc:692: if (info.handle_id == kInvalidServiceWorkerVersionId) On 2015/12/01 05:08:00, falken ...
5 years ago (2015-12-02 03:10:42 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1478103002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1478103002/40001
5 years ago (2015-12-02 03:53:34 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-02 03:58:21 UTC) #26
commit-bot: I haz the power
5 years ago (2015-12-02 03:59:03 UTC) #28
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f326225e72d172ec369cb7d551f8c8b4b963e4d7
Cr-Commit-Position: refs/heads/master@{#362624}

Powered by Google App Engine
This is Rietveld 408576698