Chromium Code Reviews| Index: base/task.h |
| =================================================================== |
| --- base/task.h (revision 86313) |
| +++ base/task.h (working copy) |
| @@ -7,11 +7,16 @@ |
| #pragma once |
| #include "base/base_api.h" |
| +#include "base/debug/alias.h" |
| #include "base/memory/raw_scoped_refptr_mismatch_checker.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/tracked.h" |
| #include "base/tuple.h" |
| +namespace base { |
| +const size_t kDeadTask = 0xDEAD7A53; |
| +} |
| + |
| // Task ------------------------------------------------------------------------ |
| // |
| // A task is a generic runnable thingy, usually used for running code on a |
| @@ -325,6 +330,7 @@ |
| ~RunnableMethod() { |
| ReleaseCallee(); |
| + obj_ = reinterpret_cast<T*>(base::kDeadTask); |
| } |
| virtual void Run() { |
| @@ -452,9 +458,17 @@ |
| } |
| ~RunnableFunction() { |
| + function_ = reinterpret_cast<Function>(base::kDeadTask); |
| } |
| virtual void Run() { |
| + // TODO(apatrick): Remove this ASAP. This ensures that the function pointer |
| + // is available in minidumps for the purpose of diagnosing 81449. |
|
darin (slow to review)
2011/05/24 04:45:19
nit: prefix bug numbers with "bug" or "crbug.com/"
|
| + Function function = function_; |
| + base::debug::Alias(&function); |
| + Params params = params_; |
| + base::debug::Alias(¶ms); |
| + |
| if (function_) |
| DispatchToFunction(function_, params_); |
| } |