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

Issue 224733014: Introduce ServiceWorkerHandle for tracking WebServiceWorkerImpl reference (Closed)

Created:
6 years, 8 months ago by kinuko
Modified:
6 years, 8 months ago
Reviewers:
michaeln, Tom Sepez
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, alecflett+watch_chromium.org
Visibility:
Public.

Description

Introduce ServiceWorkerHandle for tracking WebServiceWorkerImpl reference * Introduce a new browser-side class, ServiceWorkerHandle for keeping {Registration,Version} references for a WebSWImpl in the renderer process * Keep live handles in ServiceWorkerDispatcherHost (as handles_) * Remove cyclic dependency between Registration and Version * Remove shutdown semantics in Registration and Version BUG=349919, 361052 R=michaeln@chromium.org, tsepez@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262636

Patch Set 1 #

Patch Set 2 : #

Total comments: 9

Patch Set 3 : updated + rebased #

Patch Set 4 : build fix etc #

Patch Set 5 : sigh, rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -153 lines) Patch
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 1 chunk +2 lines, -8 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.h View 1 2 3 4 5 chunks +11 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 7 chunks +29 lines, -8 lines 0 comments Download
A content/browser/service_worker/service_worker_handle.h View 1 2 3 1 chunk +67 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_handle.cc View 1 2 3 1 chunk +50 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_job_unittest.cc View 1 2 3 chunks +6 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_provider_host.h View 1 2 4 chunks +11 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_provider_host.cc View 1 2 3 chunks +19 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 4 chunks +8 lines, -18 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.cc View 2 chunks +0 lines, -13 lines 0 comments Download
M content/browser/service_worker/service_worker_registration_unittest.cc View 2 chunks +0 lines, -31 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M content/browser/service_worker/service_worker_unregister_job.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 2 3 2 chunks +3 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 3 chunks +9 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 7 chunks +8 lines, -19 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/child/service_worker/service_worker_dispatcher.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/child/service_worker/service_worker_message_filter.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/child/service_worker/service_worker_message_filter.cc View 1 2 2 chunks +20 lines, -0 lines 0 comments Download
M content/child/service_worker/web_service_worker_impl.h View 1 2 2 chunks +5 lines, -6 lines 0 comments Download
M content/child/service_worker/web_service_worker_impl.cc View 1 2 1 chunk +11 lines, -2 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
kinuko
An attempt to fix/extend the ownership/object model. WDYT?
6 years, 8 months ago (2014-04-07 14:42:00 UTC) #1
michaeln
i really like this change a lot!
6 years, 8 months ago (2014-04-08 01:21:00 UTC) #2
michaeln
ooops sent ^^^ w/o the comments https://codereview.chromium.org/224733014/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/224733014/diff/20001/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode213 content/browser/service_worker/service_worker_dispatcher_host.cc:213: // corresponding WebServiceWorkerImpl ...
6 years, 8 months ago (2014-04-08 01:21:40 UTC) #3
michaeln
generally lgtm, if you want me to take another look after making further changes lmk
6 years, 8 months ago (2014-04-08 01:24:32 UTC) #4
kinuko
Thanks, addressed comments. I also added thread_id param to the ServiceWorkerHandle ctor (as it's needed ...
6 years, 8 months ago (2014-04-08 08:43:30 UTC) #5
kinuko
tsepez@: could you review the messages file? Thx content/common/service_worker/service_worker_messages.h
6 years, 8 months ago (2014-04-08 08:56:47 UTC) #6
Tom Sepez
Messages LGTM.
6 years, 8 months ago (2014-04-08 17:30:57 UTC) #7
kinuko
The CQ bit was checked by kinuko@chromium.org
6 years, 8 months ago (2014-04-09 00:28:53 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 00:39:53 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 01:00:45 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 01:12:34 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 01:31:55 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 01:42:23 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 01:52:50 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 02:03:16 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 02:20:53 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/90001
6 years, 8 months ago (2014-04-09 04:39:58 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-09 04:40:08 UTC) #18
commit-bot: I haz the power
Failed to apply patch for content/browser/service_worker/service_worker_dispatcher_host.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-09 04:40:09 UTC) #19
kinuko
The CQ bit was checked by kinuko@chromium.org
6 years, 8 months ago (2014-04-09 06:18:37 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 06:18:52 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 06:45:53 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 06:53:30 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 07:00:11 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 07:06:12 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 07:13:05 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 07:20:01 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 07:26:16 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 07:32:27 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 07:41:13 UTC) #30
kinuko
Committed patchset #5 manually as r262636 (presubmit successful).
6 years, 8 months ago (2014-04-09 07:43:24 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/224733014/110001
6 years, 8 months ago (2014-04-09 07:48:39 UTC) #32
commit-bot: I haz the power
6 years, 8 months ago (2014-04-09 07:48:46 UTC) #33
Message was sent while issue was closed.
Failed to apply patch for
content/browser/service_worker/service_worker_browsertest.cc:
While running patch -p1 --forward --force --no-backup-if-mismatch;
  patching file content/browser/service_worker/service_worker_browsertest.cc
  Hunk #1 FAILED at 223.
  1 out of 1 hunk FAILED -- saving rejects to file
content/browser/service_worker/service_worker_browsertest.cc.rej

Patch:       content/browser/service_worker/service_worker_browsertest.cc
Index: content/browser/service_worker/service_worker_browsertest.cc
diff --git a/content/browser/service_worker/service_worker_browsertest.cc
b/content/browser/service_worker/service_worker_browsertest.cc
index
544405ab8b90fa5f72f044b173ccc7d309594495..7536592a55bc63823fe3a660fae8e7030ae6ff9e
100644
--- a/content/browser/service_worker/service_worker_browsertest.cc
+++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -223,14 +223,8 @@ class ServiceWorkerVersionBrowserTest : public
ServiceWorkerBrowserTest {
   virtual ~ServiceWorkerVersionBrowserTest() {}
 
   virtual void TearDownOnIOThread() OVERRIDE {
-    if (registration_) {
-      registration_->Shutdown();
-      registration_ = NULL;
-    }
-    if (version_) {
-      version_->Shutdown();
-      version_ = NULL;
-    }
+    registration_ = NULL;
+    version_ = NULL;
   }
 
   void InstallTestHelper(const std::string& worker_url,

Powered by Google App Engine
This is Rietveld 408576698