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

Issue 2569963002: MemoryCoordinator checks if ServiceWorker exists on the suspending process (Closed)

Created:
4 years ago by shimazu
Modified:
4 years ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, serviceworker-reviews, creis+watch_chromium.org, shimazu+serviceworker_chromium.org, nasko+codewatch_chromium.org, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MemoryCoordinator checks if ServiceWorker exists on the suspending process If the suspending process has a worker thread, currently the worker won't respond with events any more. This patch is to keep the process running which has workers. BUG=671084 Committed: https://crrev.com/14169abdc6f1d31468cb1de6212ff256c89b92b2 Cr-Commit-Position: refs/heads/master@{#439399}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added a browser test #

Patch Set 3 : Added DCHECK and moved a comment #

Total comments: 2

Patch Set 4 : Hide the tab #

Total comments: 5

Patch Set 5 : Updated several comments #

Total comments: 2

Patch Set 6 : Updated the comment #

Total comments: 8

Patch Set 7 : Added comments and clarified the auto types #

Total comments: 4

Patch Set 8 : Descriptive -> imperative #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -34 lines) Patch
M content/browser/memory/memory_coordinator.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/memory/memory_coordinator.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 2 chunks +1 line, -4 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 5 chunks +17 lines, -12 lines 0 comments Download
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 4 5 6 7 3 chunks +67 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_process_manager_unittest.cc View 5 chunks +14 lines, -14 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 5 6 1 chunk +20 lines, -2 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 2 chunks +1 line, -2 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (22 generated)
shimazu
ptal
4 years ago (2016-12-13 05:10:51 UTC) #4
bashi
content/memory lgtm. Thanks for fixing this! BTW, is there a way to test this change ...
4 years ago (2016-12-13 05:16:36 UTC) #5
horo
https://codereview.chromium.org/2569963002/diff/1/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2569963002/diff/1/content/browser/renderer_host/render_process_host_impl.cc#newcode1374 content/browser/renderer_host/render_process_host_impl.cc:1374: return service_worker_ref_count_ + shared_worker_ref_count_; DCHECK_CURRENTLY_ON(BrowserThread::UI);
4 years ago (2016-12-13 06:29:33 UTC) #7
falken
drive by https://codereview.chromium.org/2569963002/diff/1/content/public/browser/render_process_host.h File content/public/browser/render_process_host.h (right): https://codereview.chromium.org/2569963002/diff/1/content/public/browser/render_process_host.h#newcode308 content/public/browser/render_process_host.h:308: // to the Worker in this renderer ...
4 years ago (2016-12-13 06:32:29 UTC) #9
shimazu
Thanks for your comments. I've added a browser tests and reflected reviews. PTAL again. https://codereview.chromium.org/2569963002/diff/1/content/browser/renderer_host/render_process_host_impl.cc ...
4 years ago (2016-12-13 07:24:51 UTC) #12
bashi
still lgtm on my side.
4 years ago (2016-12-13 07:51:53 UTC) #13
nhiroki
https://codereview.chromium.org/2569963002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2569963002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc#newcode2988 content/browser/service_worker/service_worker_browsertest.cc:2988: EXPECT_EQ(1u, rph->GetWorkerRefCount()); Can you check rph->IsProcessBackgrounded() before CanSuspendRenderer()? // ...
4 years ago (2016-12-13 10:24:30 UTC) #19
shimazu
Updated the browsertest. ptal again. avi@chromium.org: Could you review changes in (mock_)render_process_host? https://codereview.chromium.org/2569963002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc ...
4 years ago (2016-12-14 06:18:35 UTC) #23
Avi (use Gerrit)
https://codereview.chromium.org/2569963002/diff/60001/content/public/browser/render_process_host.h File content/public/browser/render_process_host.h (right): https://codereview.chromium.org/2569963002/diff/60001/content/public/browser/render_process_host.h#newcode309 content/public/browser/render_process_host.h:309: virtual void DecrementServiceWorkerRefCount() = 0; Extra blank line after ...
4 years ago (2016-12-14 06:41:07 UTC) #24
falken
https://codereview.chromium.org/2569963002/diff/60001/content/public/browser/render_process_host.h File content/public/browser/render_process_host.h (right): https://codereview.chromium.org/2569963002/diff/60001/content/public/browser/render_process_host.h#newcode311 content/public/browser/render_process_host.h:311: // to the Worker in this renderer process has ...
4 years ago (2016-12-14 06:58:51 UTC) #25
shimazu
Thanks for your comments! Updated. https://codereview.chromium.org/2569963002/diff/60001/content/public/browser/render_process_host.h File content/public/browser/render_process_host.h (right): https://codereview.chromium.org/2569963002/diff/60001/content/public/browser/render_process_host.h#newcode309 content/public/browser/render_process_host.h:309: virtual void DecrementServiceWorkerRefCount() = ...
4 years ago (2016-12-14 08:01:20 UTC) #26
falken
https://codereview.chromium.org/2569963002/diff/80001/content/public/browser/render_process_host.h File content/public/browser/render_process_host.h (right): https://codereview.chromium.org/2569963002/diff/80001/content/public/browser/render_process_host.h#newcode307 content/public/browser/render_process_host.h:307: // Returns the total number of shared worker and ...
4 years ago (2016-12-14 08:21:15 UTC) #27
shimazu
https://codereview.chromium.org/2569963002/diff/80001/content/public/browser/render_process_host.h File content/public/browser/render_process_host.h (right): https://codereview.chromium.org/2569963002/diff/80001/content/public/browser/render_process_host.h#newcode307 content/public/browser/render_process_host.h:307: // Returns the total number of shared worker and ...
4 years ago (2016-12-14 09:34:05 UTC) #28
Avi (use Gerrit)
lgtm
4 years ago (2016-12-14 15:44:03 UTC) #29
shimazu
falken@, nhiroki@: can I commit this patch as is?
4 years ago (2016-12-15 04:57:55 UTC) #30
nhiroki
lgtm with a nit https://codereview.chromium.org/2569963002/diff/100001/content/public/browser/render_process_host.h File content/public/browser/render_process_host.h (right): https://codereview.chromium.org/2569963002/diff/100001/content/public/browser/render_process_host.h#newcode311 content/public/browser/render_process_host.h:311: // worker ref count is ...
4 years ago (2016-12-15 05:16:05 UTC) #31
falken
https://codereview.chromium.org/2569963002/diff/100001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2569963002/diff/100001/content/browser/service_worker/service_worker_browsertest.cc#newcode2971 content/browser/service_worker/service_worker_browsertest.cc:2971: #if !defined(OS_MACOSX) Please add a comment about what this ...
4 years ago (2016-12-15 05:16:38 UTC) #32
shimazu
https://codereview.chromium.org/2569963002/diff/100001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2569963002/diff/100001/content/browser/service_worker/service_worker_browsertest.cc#newcode2971 content/browser/service_worker/service_worker_browsertest.cc:2971: #if !defined(OS_MACOSX) On 2016/12/15 05:16:38, falken wrote: > Please ...
4 years ago (2016-12-19 01:23:04 UTC) #35
falken
lgtm https://codereview.chromium.org/2569963002/diff/120001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2569963002/diff/120001/content/browser/service_worker/service_worker_browsertest.cc#newcode2985 content/browser/service_worker/service_worker_browsertest.cc:2985: // Ensures only one process host exists. nit: ...
4 years ago (2016-12-19 01:33:20 UTC) #36
shimazu
https://codereview.chromium.org/2569963002/diff/120001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2569963002/diff/120001/content/browser/service_worker/service_worker_browsertest.cc#newcode2985 content/browser/service_worker/service_worker_browsertest.cc:2985: // Ensures only one process host exists. On 2016/12/19 ...
4 years ago (2016-12-19 02:04:47 UTC) #37
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/2569963002/140001
4 years ago (2016-12-19 02:05:10 UTC) #40
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years ago (2016-12-19 03:48:36 UTC) #43
commit-bot: I haz the power
4 years ago (2016-12-19 03:51:56 UTC) #45
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/14169abdc6f1d31468cb1de6212ff256c89b92b2
Cr-Commit-Position: refs/heads/master@{#439399}

Powered by Google App Engine
This is Rietveld 408576698