New issue
Advanced search Search tips

Issue 675660 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 553459



Sign in to add a comment

Replace TaskTraits::WithFileIO()/WithWait() with a single MayBlock() trait

Project Member Reported by fdoray@chromium.org, Dec 19 2016

Issue description

Project Member

Comment 1 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c487be3e5e620a8032d69977fdbc00034328dc5a

commit c487be3e5e620a8032d69977fdbc00034328dc5a
Author: fdoray <fdoray@chromium.org>
Date: Wed Dec 21 17:28:10 2016

Update TaskTraits in easy_unlock_tpm_key_manager.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2595033002
Cr-Commit-Position: refs/heads/master@{#440137}

[modify] https://crrev.com/c487be3e5e620a8032d69977fdbc00034328dc5a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c4ec8707e0b0ce8f364bec09584e032c4407349

commit 6c4ec8707e0b0ce8f364bec09584e032c4407349
Author: fdoray <fdoray@chromium.org>
Date: Wed Dec 21 17:29:12 2016

Update TaskTraits in password_manager_util_win.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2592123003
Cr-Commit-Position: refs/heads/master@{#440138}

[modify] https://crrev.com/6c4ec8707e0b0ce8f364bec09584e032c4407349/chrome/browser/password_manager/password_manager_util_win.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/acfcc22d49973a71c3b5c9848f7564504a9b858c

commit acfcc22d49973a71c3b5c9848f7564504a9b858c
Author: fdoray <fdoray@chromium.org>
Date: Wed Dec 21 17:52:23 2016

Update TaskTraits in browser_main_loop.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2590413003
Cr-Commit-Position: refs/heads/master@{#440144}

[modify] https://crrev.com/acfcc22d49973a71c3b5c9848f7564504a9b858c/content/browser/browser_main_loop.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d75b05502d01d81785a502403fc69e8111ab0d8

commit 6d75b05502d01d81785a502403fc69e8111ab0d8
Author: fdoray <fdoray@chromium.org>
Date: Wed Dec 21 18:15:21 2016

Update TaskTraits in sw_reporter_installer_win.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2596853002
Cr-Commit-Position: refs/heads/master@{#440156}

[modify] https://crrev.com/6d75b05502d01d81785a502403fc69e8111ab0d8/chrome/browser/component_updater/sw_reporter_installer_win.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3ebe0a19ea0edd9ee8fbd930b98a21032c8ac35f

commit 3ebe0a19ea0edd9ee8fbd930b98a21032c8ac35f
Author: fdoray <fdoray@chromium.org>
Date: Wed Dec 21 18:49:04 2016

Update TaskTraits in client_cert_store_chromeos.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

R=gab@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2591693005
Cr-Commit-Position: refs/heads/master@{#440167}

[modify] https://crrev.com/3ebe0a19ea0edd9ee8fbd930b98a21032c8ac35f/chrome/browser/chromeos/net/client_cert_store_chromeos.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0903b94861590b763dbe033a13e0c0d23e50a686

commit 0903b94861590b763dbe033a13e0c0d23e50a686
Author: fdoray <fdoray@chromium.org>
Date: Wed Dec 21 19:15:02 2016

Update TaskTraits in recovery_component_installer.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
TBR=sorin@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2591903004
Cr-Commit-Position: refs/heads/master@{#440172}

[modify] https://crrev.com/0903b94861590b763dbe033a13e0c0d23e50a686/chrome/browser/component_updater/recovery_component_installer.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/75f928276fd3742f1a9b10aefae583743a864768

commit 75f928276fd3742f1a9b10aefae583743a864768
Author: fdoray <fdoray@chromium.org>
Date: Wed Dec 21 21:21:37 2016

Update TaskTraits in platform_keys_nss.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2595903002
Cr-Commit-Position: refs/heads/master@{#440217}

[modify] https://crrev.com/75f928276fd3742f1a9b10aefae583743a864768/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb6e75f0a93f25efe778ea5ae25b94eee878c52b

commit eb6e75f0a93f25efe778ea5ae25b94eee878c52b
Author: fdoray <fdoray@chromium.org>
Date: Thu Dec 22 01:21:15 2016

Update TaskTraits in google_brand_chromeos.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2595913002
Cr-Commit-Position: refs/heads/master@{#440296}

[modify] https://crrev.com/eb6e75f0a93f25efe778ea5ae25b94eee878c52b/chrome/browser/google/google_brand_chromeos.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/81a5ca8f084ec7ecada62fa3cb7788de66d3fbf4

commit 81a5ca8f084ec7ecada62fa3cb7788de66d3fbf4
Author: fdoray <fdoray@chromium.org>
Date: Thu Dec 22 12:57:50 2016

Update TaskTraits in history_service.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
TBR=sdefresne@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2592133002
Cr-Commit-Position: refs/heads/master@{#440394}

[modify] https://crrev.com/81a5ca8f084ec7ecada62fa3cb7788de66d3fbf4/components/history/core/browser/history_service.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01a20402812b5a9e3b2f92090b9865bf5c092563

commit 01a20402812b5a9e3b2f92090b9865bf5c092563
Author: fdoray <fdoray@chromium.org>
Date: Thu Dec 22 12:59:46 2016

Update TaskTraits in dom_storage_context_wrapper.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
TBR=michaeln@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2593983003
Cr-Commit-Position: refs/heads/master@{#440396}

[modify] https://crrev.com/01a20402812b5a9e3b2f92090b9865bf5c092563/content/browser/dom_storage/dom_storage_context_wrapper.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/668d7b5e35dacbae7e4025067c21f6f345b692aa

commit 668d7b5e35dacbae7e4025067c21f6f345b692aa
Author: fdoray <fdoray@chromium.org>
Date: Thu Dec 22 13:00:50 2016

Update TaskTraits in keystone_glue.mm.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
TBR=mark@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2598673002
Cr-Commit-Position: refs/heads/master@{#440397}

[modify] https://crrev.com/668d7b5e35dacbae7e4025067c21f6f345b692aa/chrome/browser/mac/keystone_glue.mm

Project Member

Comment 12 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af73e8b7936bfb9fc40bed0422061092856c5995

commit af73e8b7936bfb9fc40bed0422061092856c5995
Author: fdoray <fdoray@chromium.org>
Date: Thu Dec 22 13:51:44 2016

Update TaskTraits in user_session_manager.cc.

The .WithFileIO() and .WithWait() traits were deprecated in favor of
.MayBlock() and .WithSyncPrimitives(). See rationale in
https://docs.google.com/a/chromium.org/document/d/1ynRvQKah3Cx_eLqPS7KzIp8u73HeKIjX7HQqwSWOnF8/edit?usp=sharing

.MayBlock()
Tasks with this trait may block. This includes but is not limited to tasks
that wait on synchronous file I/O operations: read or write a file from
disk, interact with a pipe or a socket, rename or delete a file, enumerate
files in a directory, etc. This trait does not allow tasks to wait on
synchronization primitives (thread or process handles, waitable events,
condition variables).

.WithSyncPrimitives()
Tasks with this trait are allowed to block on synchronization primitives
(wait on a waitable event/condition variable, join a process/thread).
This trait implies MayBlock(), i.e. you do not need to specify MayBlock()
for a task that blocks exclusively on synchronization primitives.

R=gab@chromium.org
TBR=alemate@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2598653002
Cr-Commit-Position: refs/heads/master@{#440405}

[modify] https://crrev.com/af73e8b7936bfb9fc40bed0422061092856c5995/chrome/browser/chromeos/login/session/user_session_manager.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b7f74ea4888acbcfb6a1e831cfe72e7834e27928

commit b7f74ea4888acbcfb6a1e831cfe72e7834e27928
Author: fdoray <fdoray@chromium.org>
Date: Fri Dec 23 19:38:59 2016

TaskTraits: Rename WithSyncPrimitives() to WithBaseSyncPrimitives().

The goal of this change is to make it clear that there is no need
to try to determine whether external APIs use sync primitives when
choosing TaskTraits. WithBaseSyncPrimitives() should only be used
for tasks that use base/ sync primitives.

In a separate CL, we will make sure that there is a DCHECK failure
whenever a task without WithBaseSyncPrimitives() uses a base/
sync primitive.

TBR=sorin@chromium.org,sdefresne@chromium.org,jam@chromium.org
BUG= 675660 

Review-Url: https://codereview.chromium.org/2601623002
Cr-Commit-Position: refs/heads/master@{#440652}

[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/base/task_scheduler/task_tracker.cc
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/base/task_scheduler/task_tracker_unittest.cc
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/base/task_scheduler/task_traits.cc
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/base/task_scheduler/task_traits.h
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/base/threading/sequenced_worker_pool.cc
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/chrome/browser/component_updater/recovery_component_installer.cc
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/chrome/browser/component_updater/sw_reporter_installer_win.cc
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/components/history/core/browser/history_service.cc
[modify] https://crrev.com/b7f74ea4888acbcfb6a1e831cfe72e7834e27928/content/browser/browser_main_loop.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Jan 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d86f04df6c366289513eb7c5e113b4942ccd6f2

commit 5d86f04df6c366289513eb7c5e113b4942ccd6f2
Author: fdoray <fdoray@chromium.org>
Date: Mon Jan 09 21:06:06 2017

Remove AssertWaitAllowed from IsParentalControlActivityLoggingOn().

AssertWaitAllowed() is not required for code that don't wait
on base synchronization primitives (i.e. code that calls methods
listed above the declaration of TaskTraits::WithBaseSyncPrimitives()).

BUG= 675660 

Review-Url: https://codereview.chromium.org/2617833004
Cr-Commit-Position: refs/heads/master@{#442341}

[modify] https://crrev.com/5d86f04df6c366289513eb7c5e113b4942ccd6f2/chrome/browser/prefs/incognito_mode_prefs.cc

Status: Fixed (was: Started)

Sign in to add a comment