Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Unified Diff: base/task.h

Issue 7066006: Store information about invoked RunnableFunction on stack to aid debugging of canary channel cras... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/alias.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(&params);
+
if (function_)
DispatchToFunction(function_, params_);
}
« no previous file with comments | « base/debug/alias.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698