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

Issue 2317253007: Remove calls to IsRunningSequenceOnCurrentThread() from dom_storage_task_runner.cc (Closed)

Created:
4 years, 3 months ago by fdoray
Modified:
4 years, 3 months ago
Reviewers:
michaeln
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove calls to IsRunningSequenceOnCurrentThread() from dom_storage_task_runner.cc SequencedWorkerPool is being migrated to base/task_scheduler and there is no equivalent to IsRunningSequenceOnCurrentThread() in base/task_scheduler. Developers should use SequenceChecker to verify that tasks run sequentially. Note: SequenceChecker::CalledOnValidSequence is a no-op in non-DCHECK builds. BUG=622400 Committed: https://crrev.com/7cffceeef702204d07f906a905019f650c12e0ba Cr-Commit-Position: refs/heads/master@{#418554}

Patch Set 1 #

Total comments: 8

Patch Set 2 : CR michaeln #9 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -34 lines) Patch
M content/browser/dom_storage/dom_storage_area.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M content/browser/dom_storage/dom_storage_context_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/dom_storage/dom_storage_namespace.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/dom_storage/dom_storage_task_runner.h View 7 chunks +13 lines, -14 lines 0 comments Download
M content/browser/dom_storage/dom_storage_task_runner.cc View 1 5 chunks +24 lines, -12 lines 0 comments Download

Messages

Total messages: 21 (11 generated)
fdoray
PTAL
4 years, 3 months ago (2016-09-09 18:10:26 UTC) #6
michaeln
https://codereview.chromium.org/2317253007/diff/1/content/browser/dom_storage/dom_storage_task_runner.cc File content/browser/dom_storage/dom_storage_task_runner.cc (left): https://codereview.chromium.org/2317253007/diff/1/content/browser/dom_storage/dom_storage_task_runner.cc#oldcode67 content/browser/dom_storage/dom_storage_task_runner.cc:67: return sequenced_worker_pool_->IsRunningSequenceOnCurrentThread( wdyt about changing the impl w/o changing ...
4 years, 3 months ago (2016-09-12 22:49:17 UTC) #7
fdoray
PTAnL https://codereview.chromium.org/2317253007/diff/1/content/browser/dom_storage/dom_storage_task_runner.cc File content/browser/dom_storage/dom_storage_task_runner.cc (left): https://codereview.chromium.org/2317253007/diff/1/content/browser/dom_storage/dom_storage_task_runner.cc#oldcode67 content/browser/dom_storage/dom_storage_task_runner.cc:67: return sequenced_worker_pool_->IsRunningSequenceOnCurrentThread( On 2016/09/12 22:49:17, michaeln wrote: > ...
4 years, 3 months ago (2016-09-13 14:24:14 UTC) #8
michaeln
lgtm, but please see comments about being surprised at the loss of ability to rely ...
4 years, 3 months ago (2016-09-14 00:35:12 UTC) #9
fdoray
https://codereview.chromium.org/2317253007/diff/1/content/browser/dom_storage/dom_storage_task_runner.cc File content/browser/dom_storage/dom_storage_task_runner.cc (left): https://codereview.chromium.org/2317253007/diff/1/content/browser/dom_storage/dom_storage_task_runner.cc#oldcode67 content/browser/dom_storage/dom_storage_task_runner.cc:67: return sequenced_worker_pool_->IsRunningSequenceOnCurrentThread( On 2016/09/14 00:35:12, michaeln wrote: > On ...
4 years, 3 months ago (2016-09-14 13:23:53 UTC) #12
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/2317253007/20001
4 years, 3 months ago (2016-09-14 13:24:10 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-09-14 14:21:07 UTC) #17
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/7cffceeef702204d07f906a905019f650c12e0ba Cr-Commit-Position: refs/heads/master@{#418554}
4 years, 3 months ago (2016-09-14 14:23:03 UTC) #19
michaeln
> As code is migrated to base/task_scheduler, more tasks will run on sequences > rather ...
4 years, 3 months ago (2016-09-14 19:13:50 UTC) #20
fdoray
4 years, 3 months ago (2016-09-14 19:24:20 UTC) #21
Message was sent while issue was closed.
On 2016/09/14 19:13:50, michaeln wrote:
> > As code is migrated to base/task_scheduler, more tasks will run on sequences
> > rather than specific thread. In that world, I believe that
> > TaskRunner::RunsTasksOnCurrentThread (with its current description) isn't
> > helpful and should be removed.
> > 
> > It could be replaced with:
> > 
> > // Returns true iff the current task can't run at the same
> > // time as another task posted to this TaskRunner. In
> > // particular, will return true if the current task was posted
> > // to this TaskRunner.
> > bool IsSequencedWithCurrentTask() const = 0;
> > 
> > But all of this won't be done immediately.
> 
> It might make sense to DEPRECATE the existing RunsTasksOnCurrentThread()
method
> and puts some words of warning in the .h file about how it's not trustworthy
due
> to the migration to task_scheduler.

We opened a bug this morning crbug.com/646905 . We plan to find a new name and
description for RunsTasksOnCurrentThread() that matches developer's needs /
expectations.

Powered by Google App Engine
This is Rietveld 408576698