Index: src/debug.h |
diff --git a/src/debug.h b/src/debug.h |
index 73b8b00ec81bb56a450b3d2c0553788870c17aac..3a9f82388c44524e15e3795b6ded916c1bc2c697 100644 |
--- a/src/debug.h |
+++ b/src/debug.h |
@@ -261,15 +261,17 @@ class ScriptCache : private HashMap { |
class DebugInfoListNode { |
public: |
explicit DebugInfoListNode(DebugInfo* debug_info); |
- virtual ~DebugInfoListNode(); |
+ virtual ~DebugInfoListNode() { ClearInfo(); } |
DebugInfoListNode* next() { return next_; } |
void set_next(DebugInfoListNode* next) { next_ = next; } |
- Handle<DebugInfo> debug_info() { return debug_info_; } |
+ Handle<DebugInfo> debug_info() { return Handle<DebugInfo>(debug_info_); } |
+ |
+ void ClearInfo(); |
private: |
// Global (weak) handle to the debug info object. |
- Handle<DebugInfo> debug_info_; |
+ DebugInfo** debug_info_; |
// Next pointer for linked list. |
DebugInfoListNode* next_; |