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

Issue 2204873002: ServiceWorker: Run functions in the browsertest on appropriate thread (Closed)

Created:
4 years, 4 months ago by shimazu
Modified:
4 years, 4 months ago
Reviewers:
nhiroki
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, 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

ServiceWorker: Run functions in the browsertest on appropriate thread This patch fixes some race conditions which are exposed by fixes of mojo; previously some variables (|quit_| and |messages_|) were shared among IO thread and UI thread in race condition, and EmbeddedWorkerInstance::AddListener/RemoveListener was called on UI thread. TSan failures caused by these problems will be cleared by this patch. BUG=631323, 631311 TEST=/out/tsan/content_browsertests --no-sandbox --gtest_filter="ServiceWorkerVersionBrowserTest.*" Committed: https://crrev.com/45268ac16ef424a359dbc5d130a2225dd7f13368 Cr-Commit-Position: refs/heads/master@{#410300}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Use PostTask instead of locking #

Patch Set 3 : Add DCHECK #

Total comments: 4

Patch Set 4 : Fix typo and remove unnecessary PostTask #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -36 lines) Patch
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 4 10 chunks +36 lines, -36 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 25 (10 generated)
shimazu
PTAL
4 years, 4 months ago (2016-08-02 08:33:59 UTC) #2
nhiroki
https://codereview.chromium.org/2204873002/diff/1/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2204873002/diff/1/content/browser/service_worker/service_worker_browsertest.cc#newcode386 content/browser/service_worker/service_worker_browsertest.cc:386: const GURL& source_url) override { Can you add DCHECK_CURRENTLY_ON(BrowserThread::IO)? ...
4 years, 4 months ago (2016-08-02 09:15:43 UTC) #3
nhiroki
https://codereview.chromium.org/2204873002/diff/1/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2204873002/diff/1/content/browser/service_worker/service_worker_browsertest.cc#newcode392 content/browser/service_worker/service_worker_browsertest.cc:392: } On 2016/08/02 09:15:43, nhiroki wrote: > How about ...
4 years, 4 months ago (2016-08-02 09:16:32 UTC) #4
nhiroki
> those were not actual problems in this browsertest because each code blocks are blocked ...
4 years, 4 months ago (2016-08-02 09:23:22 UTC) #5
shimazu
Thanks, ptal again:) https://codereview.chromium.org/2204873002/diff/1/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2204873002/diff/1/content/browser/service_worker/service_worker_browsertest.cc#newcode386 content/browser/service_worker/service_worker_browsertest.cc:386: const GURL& source_url) override { On ...
4 years, 4 months ago (2016-08-02 23:34:49 UTC) #6
nhiroki
https://codereview.chromium.org/2204873002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2204873002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc#newcode410 content/browser/service_worker/service_worker_browsertest.cc:410: void OnReportCOnsoleMessageOnUI(const base::string16& message) { s/COnsole/Console/ https://codereview.chromium.org/2204873002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc#newcode414 content/browser/service_worker/service_worker_browsertest.cc:414: BrowserThread::PostTask(BrowserThread::UI, ...
4 years, 4 months ago (2016-08-03 00:00:58 UTC) #7
shimazu
Thanks, Fixed. https://codereview.chromium.org/2204873002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/2204873002/diff/40001/content/browser/service_worker/service_worker_browsertest.cc#newcode410 content/browser/service_worker/service_worker_browsertest.cc:410: void OnReportCOnsoleMessageOnUI(const base::string16& message) { On 2016/08/03 ...
4 years, 4 months ago (2016-08-03 00:15:58 UTC) #8
nhiroki
On 2016/08/02 09:23:22, nhiroki wrote: > > those were not actual problems in this browsertest ...
4 years, 4 months ago (2016-08-03 00:29:45 UTC) #9
shimazu
On 2016/08/03 00:29:45, nhiroki wrote: > On 2016/08/02 09:23:22, nhiroki wrote: > > > those ...
4 years, 4 months ago (2016-08-03 03:35:18 UTC) #13
nhiroki
lgtm Reg: CL subject and description, s/appropreate/appropriate/
4 years, 4 months ago (2016-08-03 06:09: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/2204873002/80001
4 years, 4 months ago (2016-08-03 06:17:58 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/106141) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 4 months ago (2016-08-03 06:24:53 UTC) #19
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/2204873002/80001
4 years, 4 months ago (2016-08-08 02:58:06 UTC) #21
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-08 04:48:54 UTC) #23
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 04:50:28 UTC) #25
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/45268ac16ef424a359dbc5d130a2225dd7f13368
Cr-Commit-Position: refs/heads/master@{#410300}

Powered by Google App Engine
This is Rietveld 408576698