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

Issue 1358063004: Use mojo to connect to BackgroundSyncManager object (Closed)

Created:
5 years, 3 months ago by chasej
Modified:
5 years, 2 months ago
Reviewers:
michaeln, jkarlin, davidben
CC:
chromium-reviews, tim+watch_chromium.org, mlamouri+watch-content_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, jam, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, jkarlin+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use mojo to connect to BackgroundSyncManager object Removes the BackgroundSyncProviderThreadProxy class, and the manual hopping from workers to the main thread. The proxy class was passing WebStrings across threads, which aren't thread-safe. With mojo connections, it lets mojo handle the thread hopping more efficiently, and the mojo structs passed are thread-safe. Tested using https://jakearchibald.github.io/isserviceworkerready/demos/sync/, as well as new browser tests. BUG=527601 Committed: https://crrev.com/f993b733666c5c3664889be5c61b65f3f48b222d Cr-Commit-Position: refs/heads/master@{#354963}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Add browser tests #

Total comments: 8

Patch Set 4 : Add watcher for main thread shutdown #

Patch Set 5 : Rebase #

Patch Set 6 : Make platform impl control cleanup of main thread provider #

Total comments: 6

Patch Set 7 : Address latest code review feedback #

Patch Set 8 : Fix compile warning on Windows #

Patch Set 9 : Add back Leaky to TLS instances of provider #

Total comments: 4

Patch Set 10 : Rework cleanup of main thread provider #

Patch Set 11 : Rebase #

Patch Set 12 : BlinkPlatformImpl explicitly owns main thread provider #

Patch Set 13 : Rebase #

Patch Set 14 : Fix crash in HasWindowProviderHost #

Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -389 lines) Patch
M content/browser/background_sync/background_sync_browsertest.cc View 1 2 3 4 6 chunks +104 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_context_core.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M content/child/background_sync/background_sync_provider.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +26 lines, -9 lines 0 comments Download
M content/child/background_sync/background_sync_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +58 lines, -7 lines 0 comments Download
D content/child/background_sync/background_sync_provider_thread_proxy.h View 1 2 3 4 1 chunk +0 lines, -95 lines 0 comments Download
D content/child/background_sync/background_sync_provider_thread_proxy.cc View 1 2 3 4 1 chunk +0 lines, -253 lines 0 comments Download
M content/child/blink_platform_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -9 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -2 lines 0 comments Download
M content/renderer/background_sync/background_sync_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -4 lines 0 comments Download
M content/test/data/background_sync/background_sync_test_helpers.js View 1 2 3 4 5 6 4 chunks +30 lines, -2 lines 0 comments Download
M content/test/data/background_sync/service_worker.js View 1 2 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (11 generated)
chasej
jkarlin, please take a look.
5 years, 2 months ago (2015-09-28 16:09:03 UTC) #2
jkarlin
+R michaeln as he is interested in this bug https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.cc#newcode35 content/child/background_sync/background_sync_provider.cc:35: ...
5 years, 2 months ago (2015-09-28 20:10:05 UTC) #4
jkarlin
https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.h File content/child/background_sync/background_sync_provider.h (right): https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.h#newcode73 content/child/background_sync/background_sync_provider.h:73: void WillStopCurrentWorkerThread() override; I see how worker threads get ...
5 years, 2 months ago (2015-09-28 20:12:51 UTC) #5
michaeln
thnx for cc'ing me https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.h File content/child/background_sync/background_sync_provider.h (right): https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.h#newcode73 content/child/background_sync/background_sync_provider.h:73: void WillStopCurrentWorkerThread() override; On 2015/09/28 ...
5 years, 2 months ago (2015-10-02 00:13:08 UTC) #6
chasej
On 2015/10/02 00:13:08, michaeln wrote: > thnx for cc'ing me > > https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.h > File ...
5 years, 2 months ago (2015-10-08 03:25:30 UTC) #7
chasej
https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1358063004/diff/40001/content/child/background_sync/background_sync_provider.cc#newcode35 content/child/background_sync/background_sync_provider.cc:35: mojo::InterfaceRequest<BackgroundSyncService> request) { On 2015/09/28 20:10:05, jkarlin wrote: > ...
5 years, 2 months ago (2015-10-08 03:28:54 UTC) #8
jkarlin
https://codereview.chromium.org/1358063004/diff/100001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1358063004/diff/100001/content/child/background_sync/background_sync_provider.cc#newcode41 content/child/background_sync/background_sync_provider.cc:41: LazyInstance<ThreadLocalPointer<BackgroundSyncProvider>>::Leaky Why Leaky? https://codereview.chromium.org/1358063004/diff/100001/content/child/background_sync/background_sync_provider.cc#newcode57 content/child/background_sync/background_sync_provider.cc:57: bool on_main_thread = main_thread_task_runner ...
5 years, 2 months ago (2015-10-08 15:43:14 UTC) #9
chasej
jkarlin, michaeln please take another look. https://codereview.chromium.org/1358063004/diff/100001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1358063004/diff/100001/content/child/background_sync/background_sync_provider.cc#newcode41 content/child/background_sync/background_sync_provider.cc:41: LazyInstance<ThreadLocalPointer<BackgroundSyncProvider>>::Leaky On 2015/10/08 ...
5 years, 2 months ago (2015-10-09 14:58:30 UTC) #10
jkarlin
lgtm but see comment https://codereview.chromium.org/1358063004/diff/100001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1358063004/diff/100001/content/child/background_sync/background_sync_provider.cc#newcode41 content/child/background_sync/background_sync_provider.cc:41: LazyInstance<ThreadLocalPointer<BackgroundSyncProvider>>::Leaky On 2015/10/09 14:58:29, chasej ...
5 years, 2 months ago (2015-10-09 15:13:26 UTC) #11
chasej
On 2015/10/09 15:13:26, jkarlin wrote: > lgtm but see comment > > https://codereview.chromium.org/1358063004/diff/100001/content/child/background_sync/background_sync_provider.cc > File ...
5 years, 2 months ago (2015-10-09 16:00:07 UTC) #12
chasej
michaeln, please take a look. I loosely followed the IndexedDBDispatcher example you provided for managing ...
5 years, 2 months ago (2015-10-13 18:18:25 UTC) #14
michaeln
lgtm 2
5 years, 2 months ago (2015-10-14 01:24:35 UTC) #15
chasej
davidben, please take a look at content/child/blink_platform_impl.*
5 years, 2 months ago (2015-10-14 17:24:53 UTC) #18
davidben
https://codereview.chromium.org/1358063004/diff/160001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/1358063004/diff/160001/content/child/blink_platform_impl.cc#newcode461 content/child/blink_platform_impl.cc:461: main_thread_sync_provider_.reset( This is a scoped_ptr, but the method is ...
5 years, 2 months ago (2015-10-14 21:52:16 UTC) #19
chasej
davidben, please take another look. For jkarlin, michaeln, the approach for the main thread provider ...
5 years, 2 months ago (2015-10-15 17:40:27 UTC) #20
davidben
content/child/blink_platform_impl.* lgtm. I didn't look at the other files carefully since I wasn't asked to. ...
5 years, 2 months ago (2015-10-15 18:16:17 UTC) #21
jkarlin
lgtm though I preferred the approach from PS9.
5 years, 2 months ago (2015-10-15 19:06:21 UTC) #22
davidben
On 2015/10/15 19:06:21, jkarlin wrote: > lgtm though I preferred the approach from PS9. Perhaps ...
5 years, 2 months ago (2015-10-15 19:11:39 UTC) #23
jkarlin
On 2015/10/15 19:11:39, David Benjamin wrote: > On 2015/10/15 19:06:21, jkarlin wrote: > > lgtm ...
5 years, 2 months ago (2015-10-15 20:36:07 UTC) #24
chasej
On 2015/10/15 20:36:07, jkarlin wrote: > On 2015/10/15 19:11:39, David Benjamin wrote: > > On ...
5 years, 2 months ago (2015-10-16 16:06:49 UTC) #25
jkarlin
slgtm, thanks!
5 years, 2 months ago (2015-10-16 16:10:09 UTC) #26
jkarlin
I believe that David is out for a bit. I've reviewed the small changes that ...
5 years, 2 months ago (2015-10-19 11:55:26 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1358063004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1358063004/220001
5 years, 2 months ago (2015-10-19 13:46:52 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/68208)
5 years, 2 months ago (2015-10-19 14:11:44 UTC) #32
chasej
jkarlin, michaeln, please take a look. A recent CL from jkarlin (1398633004) broke the browser ...
5 years, 2 months ago (2015-10-19 21:04:33 UTC) #34
jkarlin
On 2015/10/19 21:04:33, chasej wrote: > jkarlin, michaeln, please take a look. > > A ...
5 years, 2 months ago (2015-10-19 22:33:52 UTC) #35
michaeln
still lgtm w
5 years, 2 months ago (2015-10-19 23:28:45 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1358063004/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1358063004/260001
5 years, 2 months ago (2015-10-20 02:47:33 UTC) #39
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 2 months ago (2015-10-20 02:53:02 UTC) #40
commit-bot: I haz the power
5 years, 2 months ago (2015-10-20 02:53:47 UTC) #41
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/f993b733666c5c3664889be5c61b65f3f48b222d
Cr-Commit-Position: refs/heads/master@{#354963}

Powered by Google App Engine
This is Rietveld 408576698