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

Issue 2307543002: ServiceWorker: Mojofication of EWInstance::StopWorker (Closed)

Created:
4 years, 3 months ago by shimazu
Modified:
4 years, 2 months ago
Reviewers:
dcheng, horo
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, viettrungluu+watch_chromium.org, qsr+mojo_chromium.org, mlamouri+watch-content_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, abarth-chromium, Aaron Boodman, kinuko+serviceworker, yzshen+watch_chromium.org, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, darin (slow to review), blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Mojofication of EWInstance::StopWorker In this patch, EWInstance will send StopWorker IPC using mojo. Mojo has their own error handling mechanism, and in this case errors will be handled as detach. BUG=629701 Committed: https://crrev.com/6ea839368fd4dbff868df10ef18fc3a6acdda2be Cr-Commit-Position: refs/heads/master@{#424707}

Patch Set 1 #

Patch Set 2 : Added a unittest file #

Total comments: 13

Patch Set 3 : Used TEST_P and added DCHECKs #

Patch Set 4 : Rebase #

Total comments: 8

Patch Set 5 : Rebase #

Patch Set 6 : Incorporated with the review #

Total comments: 12

Patch Set 7 : Updated comments and misc things #

Total comments: 2

Patch Set 8 : Added a check of the status when detached #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -114 lines) Patch
M content/browser/service_worker/embedded_worker_instance.cc View 1 2 3 4 5 6 4 chunks +15 lines, -4 lines 0 comments Download
M content/browser/service_worker/embedded_worker_instance_unittest.cc View 1 2 3 4 5 6 7 15 chunks +108 lines, -26 lines 0 comments Download
M content/browser/service_worker/embedded_worker_registry.h View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/service_worker/embedded_worker_registry.cc View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.h View 1 2 3 4 5 6 7 3 chunks +12 lines, -1 line 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 2 3 4 5 6 7 10 chunks +49 lines, -36 lines 0 comments Download
M content/common/service_worker/embedded_worker.mojom View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/service_worker/embedded_worker_dispatcher.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/service_worker/embedded_worker_dispatcher.cc View 1 2 3 4 5 4 chunks +23 lines, -14 lines 0 comments Download
M content/renderer/service_worker/embedded_worker_instance_client_impl.h View 1 2 3 4 5 6 2 chunks +27 lines, -4 lines 0 comments Download
M content/renderer/service_worker/embedded_worker_instance_client_impl.cc View 1 2 3 4 5 6 1 chunk +42 lines, -21 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 3 4 5 6 7 3 chunks +11 lines, -5 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 4 5 6 7 5 chunks +16 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (7 generated)
shimazu
ptal
4 years, 3 months ago (2016-09-02 03:16:06 UTC) #2
horo
https://codereview.chromium.org/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance.cc#newcode788 content/browser/service_worker/embedded_worker_instance.cc:788: registry_->DetachWorker(process_id(), embedded_worker_id()); Could you please explain why you don't ...
4 years, 3 months ago (2016-09-05 08:05:57 UTC) #3
shimazu
Updated. PTAL again. https://codereview.chromium.org/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance.cc#newcode788 content/browser/service_worker/embedded_worker_instance.cc:788: registry_->DetachWorker(process_id(), embedded_worker_id()); On 2016/09/05 08:05:57, horo ...
4 years, 3 months ago (2016-09-06 08:53:59 UTC) #4
horo
https://codereview.chromium.org/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance.cc#newcode788 content/browser/service_worker/embedded_worker_instance.cc:788: registry_->DetachWorker(process_id(), embedded_worker_id()); On 2016/09/06 08:53:59, shimazu wrote: > On ...
4 years, 3 months ago (2016-09-13 08:25:33 UTC) #5
shimazu
Updated. PTAL again:) https://codereview.chromium.org/2307543002/diff/60001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/2307543002/diff/60001/content/browser/service_worker/embedded_worker_instance.cc#newcode481 content/browser/service_worker/embedded_worker_instance.cc:481: if (!client_) { On 2016/09/13 08:25:32, ...
4 years, 3 months ago (2016-09-20 04:56:21 UTC) #6
horo
Sorry for the delay. https://codereview.chromium.org/2307543002/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/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance_unittest.cc#newcode483 content/browser/service_worker/embedded_worker_instance_unittest.cc:483: EXPECT_EQ(EmbeddedWorkerStatus::STARTING, events_[0].status); On 2016/09/13 08:25:32, ...
4 years, 2 months ago (2016-09-27 01:59:23 UTC) #7
dcheng
https://codereview.chromium.org/2307543002/diff/100001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/2307543002/diff/100001/content/browser/service_worker/embedded_worker_instance.cc#newcode463 content/browser/service_worker/embedded_worker_instance.cc:463: base::Bind(&EmbeddedWorkerInstance::Detach, AsWeakPtr())); It should be unnecessary to use AsWeakPtr() ...
4 years, 2 months ago (2016-09-30 08:25:29 UTC) #8
shimazu
Thanks for your reviews! PTAL again. https://codereview.chromium.org/2307543002/diff/100001/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc (right): https://codereview.chromium.org/2307543002/diff/100001/content/browser/service_worker/embedded_worker_instance.cc#newcode463 content/browser/service_worker/embedded_worker_instance.cc:463: base::Bind(&EmbeddedWorkerInstance::Detach, AsWeakPtr())); On ...
4 years, 2 months ago (2016-10-06 03:50:52 UTC) #9
horo
lgtm https://codereview.chromium.org/2307543002/diff/120001/content/browser/service_worker/embedded_worker_instance_unittest.cc File content/browser/service_worker/embedded_worker_instance_unittest.cc (right): https://codereview.chromium.org/2307543002/diff/120001/content/browser/service_worker/embedded_worker_instance_unittest.cc#newcode519 content/browser/service_worker/embedded_worker_instance_unittest.cc:519: events_.clear(); Please see https://codereview.chromium.org/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance_unittest.cc#newcode483
4 years, 2 months ago (2016-10-06 07:38:29 UTC) #10
shimazu
Updated. dcheng@: ptal again? https://codereview.chromium.org/2307543002/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/2307543002/diff/20001/content/browser/service_worker/embedded_worker_instance_unittest.cc#newcode483 content/browser/service_worker/embedded_worker_instance_unittest.cc:483: EXPECT_EQ(EmbeddedWorkerStatus::STARTING, events_[0].status); On 2016/09/27 01:59:23, ...
4 years, 2 months ago (2016-10-12 08:33:13 UTC) #11
dcheng
Well, I really don't like the funny business with std::unique_ptr, but I guess that shouldn't ...
4 years, 2 months ago (2016-10-12 08:41:30 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2307543002/140001
4 years, 2 months ago (2016-10-12 08:58:52 UTC) #18
shimazu
On 2016/10/12 08:41:30, dcheng wrote: > Well, I really don't like the funny business with ...
4 years, 2 months ago (2016-10-12 09:04:29 UTC) #19
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 2 months ago (2016-10-12 10:40:29 UTC) #20
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 10:44:04 UTC) #22
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/6ea839368fd4dbff868df10ef18fc3a6acdda2be
Cr-Commit-Position: refs/heads/master@{#424707}

Powered by Google App Engine
This is Rietveld 408576698