New issue
Advanced search Search tips

Issue 694268 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Add thread checker based DCHECK's into base::CancelableCallback

Project Member Reported by emaxx@chromium.org, Feb 20 2017

Issue description

The base::CancelableCallback has very specific requirements on the consumer code that must be followed for the thread safety:

// CancelableCallback objects must be created on, posted to, cancelled on, and
// destroyed on the same thread.
https://cs.chromium.org/chromium/src/base/cancelable_callback.h?l=16

However, these requirements are not covered with any debug checks.

Quick test (introducing ThreadChecker into CancelableCallback and running all tests) shows that there is some code that actually violates these thread safety requirements.
 

Comment 1 by emaxx@chromium.org, Feb 20 2017

Cc: jhawkins@chromium.org

Sign in to add a comment