diff options
author | Kristian Monsen <kristianm@google.com> | 2011-05-11 20:53:37 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-05-16 13:54:48 +0100 |
commit | 21d179b334e59e9a3bfcaed4c4430bef1bc5759d (patch) | |
tree | 64e2bb6da27af6a5c93ca34f6051584aafbfcb9e /base/task.h | |
parent | 0c63f00edd6ed0482fd5cbcea937ca088baf7858 (diff) | |
download | external_chromium-21d179b334e59e9a3bfcaed4c4430bef1bc5759d.zip external_chromium-21d179b334e59e9a3bfcaed4c4430bef1bc5759d.tar.gz external_chromium-21d179b334e59e9a3bfcaed4c4430bef1bc5759d.tar.bz2 |
Merge Chromium at 10.0.621.0: Initial merge by git.
Change-Id: I070cc91c608dfa4a968a5a54c173260765ac8097
Diffstat (limited to 'base/task.h')
-rw-r--r-- | base/task.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/base/task.h b/base/task.h index b21ccd8..e6e0d2d 100644 --- a/base/task.h +++ b/base/task.h @@ -149,8 +149,9 @@ class ScopedRunnableMethodFactory { : obj_(obj), meth_(meth), params_(params) { - COMPILE_ASSERT((MethodUsesScopedRefptrCorrectly<Method, Params>::value), - badscopedrunnablemethodparams); + COMPILE_ASSERT( + (base::internal::ParamsUseScopedRefptrCorrectly<Params>::value), + badscopedrunnablemethodparams); } virtual void Run() { @@ -317,8 +318,9 @@ class RunnableMethod : public CancelableTask { RunnableMethod(T* obj, Method meth, const Params& params) : obj_(obj), meth_(meth), params_(params) { traits_.RetainCallee(obj_); - COMPILE_ASSERT((MethodUsesScopedRefptrCorrectly<Method, Params>::value), - badrunnablemethodparams); + COMPILE_ASSERT( + (base::internal::ParamsUseScopedRefptrCorrectly<Params>::value), + badrunnablemethodparams); } ~RunnableMethod() { @@ -336,10 +338,10 @@ class RunnableMethod : public CancelableTask { private: void ReleaseCallee() { - if (obj_) { - traits_.ReleaseCallee(obj_); - obj_ = NULL; - } + T* obj = obj_; + obj_ = NULL; + if (obj) + traits_.ReleaseCallee(obj); } T* obj_; @@ -429,8 +431,9 @@ class RunnableFunction : public CancelableTask { public: RunnableFunction(Function function, const Params& params) : function_(function), params_(params) { - COMPILE_ASSERT((FunctionUsesScopedRefptrCorrectly<Function, Params>::value), - badrunnablefunctionparams); + COMPILE_ASSERT( + (base::internal::ParamsUseScopedRefptrCorrectly<Params>::value), + badrunnablefunctionparams); } ~RunnableFunction() { |