diff options
Diffstat (limited to 'chromium/docs/design/threading.md')
-rw-r--r-- | chromium/docs/design/threading.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/docs/design/threading.md b/chromium/docs/design/threading.md index 244e536e16f..20f3b3397f6 100644 --- a/chromium/docs/design/threading.md +++ b/chromium/docs/design/threading.md @@ -145,7 +145,7 @@ a delay on a particular thread. A task is represented by the `base::Closure` typedef, which contains a `Run()` function, and is created by calling `base::Bind()`. To process a task, the message loop eventually calls `base::Closure`'s `Run` function, and then drops the reference to the task -object. Both `PostTask` and `PostDelayedTask` take a `tracked_objects::Location` +object. Both `PostTask` and `PostDelayedTask` take a `base::Location` parameter, which is used for lightweight debugging purposes (counts and primitive profiling of pending and completed tasks can be monitored in a debug build via the url about:objects). Generally the macro value `FROM_HERE` is the @@ -232,7 +232,7 @@ sure to use `RefCountedThreadSafe` and not plain `RefCounted` as the base class for these objects). To ensure that the object lives throughout the entire request, the Closure generated by `base::Bind` must keep a reference to it. This can be done by passing scoped_refptr as the parameter type, or by wrapping the -raw pointer with `make_scoped_refptr()`: +raw pointer with `base::WrapRefCounted()`: class SomeParamObject : public base::RefCountedThreadSafe<SomeParamObject> { ... @@ -254,7 +254,7 @@ raw pointer with `make_scoped_refptr()`: SomeParamObject* param = new SomeParamObject; thread_->message_loop()->PostTask(FROM_HERE, base::Bind(&MyObject::DoSomethingOnAnotherThread, this, - base::RetainedRef(make_scoped_refptr(param)))); + base::RetainedRef(base::WrapRefCounted(param)))); } void DoSomething3() { |