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

Unified Diff: content/plugin/npobject_stub.h

Issue 7748024: Add some instrumentation to catch the source of a potential double-free. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: alias the liveness token too Created 9 years, 4 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 | « no previous file | content/plugin/npobject_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/plugin/npobject_stub.h
===================================================================
--- content/plugin/npobject_stub.h (revision 98369)
+++ content/plugin/npobject_stub.h (working copy)
@@ -11,6 +11,7 @@
#include <vector>
+#include "base/debug/stack_trace.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/plugin/npobject_base.h"
@@ -85,6 +86,24 @@
IPC::Message* reply_msg);
private:
+ //----------------------------------------------------------------------------
+ // Temporary code for debugging 94179
+ // TODO(eroman): Delete this when done investigating.
+ //----------------------------------------------------------------------------
+ void CheckIsAlive();
+ static void DeleteSoonHelper(
+ const base::debug::StackTrace& task_origin_stack_trace,
+ NPObjectStub* stub);
+
+ bool has_deletion_stack_trace_;
+ base::debug::StackTrace deletion_stack_trace_;
+
+ // Value to indicate whether this instance is alive or dead.
+ static const int kTokenAlive = 0x1Cd9fe38;
+ static const int kTokenDead = 0xDEADBEEF;
+ int liveness_token_;
+ //----------------------------------------------------------------------------
+
NPObject* npobject_;
scoped_refptr<PluginChannelBase> channel_;
int route_id_;
« no previous file with comments | « no previous file | content/plugin/npobject_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698