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

Side by Side Diff: src/debug.h

Issue 1255793003: Debugger: do not hold onto debug infos weakly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase and address comments Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_DEBUG_H_ 5 #ifndef V8_DEBUG_H_
6 #define V8_DEBUG_H_ 6 #define V8_DEBUG_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 Isolate* isolate_; 207 Isolate* isolate_;
208 Handle<WeakValueHashTable> table_; 208 Handle<WeakValueHashTable> table_;
209 }; 209 };
210 210
211 211
212 // Linked list holding debug info objects. The debug info objects are kept as 212 // Linked list holding debug info objects. The debug info objects are kept as
213 // weak handles to avoid a debug info object to keep a function alive. 213 // weak handles to avoid a debug info object to keep a function alive.
214 class DebugInfoListNode { 214 class DebugInfoListNode {
215 public: 215 public:
216 explicit DebugInfoListNode(DebugInfo* debug_info); 216 explicit DebugInfoListNode(DebugInfo* debug_info);
217 virtual ~DebugInfoListNode() { ClearInfo(); } 217 ~DebugInfoListNode();
218 218
219 DebugInfoListNode* next() { return next_; } 219 DebugInfoListNode* next() { return next_; }
220 void set_next(DebugInfoListNode* next) { next_ = next; } 220 void set_next(DebugInfoListNode* next) { next_ = next; }
221 Handle<DebugInfo> debug_info() { return Handle<DebugInfo>(debug_info_); } 221 Handle<DebugInfo> debug_info() { return Handle<DebugInfo>(debug_info_); }
222 222
223 void ClearInfo();
224
225 private: 223 private:
226 // Global (weak) handle to the debug info object. 224 // Global (weak) handle to the debug info object.
227 DebugInfo** debug_info_; 225 DebugInfo** debug_info_;
228 226
229 // Next pointer for linked list. 227 // Next pointer for linked list.
230 DebugInfoListNode* next_; 228 DebugInfoListNode* next_;
231 }; 229 };
232 230
233 231
234 232
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 bool IsDebugGlobal(GlobalObject* global); 467 bool IsDebugGlobal(GlobalObject* global);
470 468
471 // Check whether this frame is just about to return. 469 // Check whether this frame is just about to return.
472 bool IsBreakAtReturn(JavaScriptFrame* frame); 470 bool IsBreakAtReturn(JavaScriptFrame* frame);
473 471
474 // Support for LiveEdit 472 // Support for LiveEdit
475 void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id, 473 void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
476 LiveEdit::FrameDropMode mode, 474 LiveEdit::FrameDropMode mode,
477 Object** restarter_frame_function_pointer); 475 Object** restarter_frame_function_pointer);
478 476
479 // Passed to MakeWeak.
480 static void HandlePhantomDebugInfo(
481 const PhantomCallbackData<DebugInfoListNode>& data);
482
483 // Threading support. 477 // Threading support.
484 char* ArchiveDebug(char* to); 478 char* ArchiveDebug(char* to);
485 char* RestoreDebug(char* from); 479 char* RestoreDebug(char* from);
486 static int ArchiveSpacePerThread(); 480 static int ArchiveSpacePerThread();
487 void FreeThreadResources() { } 481 void FreeThreadResources() { }
488 482
489 // Record function from which eval was called. 483 // Record function from which eval was called.
490 static void RecordEvalCaller(Handle<Script> script); 484 static void RecordEvalCaller(Handle<Script> script);
491 485
492 bool CheckExecutionState(int id) { 486 bool CheckExecutionState(int id) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 bool auto_continue); 587 bool auto_continue);
594 void InvokeMessageHandler(MessageImpl message); 588 void InvokeMessageHandler(MessageImpl message);
595 589
596 static bool CompileDebuggerScript(Isolate* isolate, int index); 590 static bool CompileDebuggerScript(Isolate* isolate, int index);
597 void ClearOneShot(); 591 void ClearOneShot();
598 void ActivateStepIn(StackFrame* frame); 592 void ActivateStepIn(StackFrame* frame);
599 void ClearStepIn(); 593 void ClearStepIn();
600 void ActivateStepOut(StackFrame* frame); 594 void ActivateStepOut(StackFrame* frame);
601 void ClearStepNext(); 595 void ClearStepNext();
602 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info); 596 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info);
603 void RemoveDebugInfo(DebugInfo** debug_info);
604 void RemoveDebugInfo(DebugInfoListNode* node);
605 void RemoveDebugInfo(DebugInfoListNode* prev, DebugInfoListNode* node);
606 Handle<Object> CheckBreakPoints(Handle<Object> break_point); 597 Handle<Object> CheckBreakPoints(Handle<Object> break_point);
607 bool CheckBreakPoint(Handle<Object> break_point_object); 598 bool CheckBreakPoint(Handle<Object> break_point_object);
608 599
609 inline void AssertDebugContext() { 600 inline void AssertDebugContext() {
610 DCHECK(isolate_->context() == *debug_context()); 601 DCHECK(isolate_->context() == *debug_context());
611 DCHECK(in_debug_scope()); 602 DCHECK(in_debug_scope());
612 } 603 }
613 604
614 void ThreadInit(); 605 void ThreadInit();
615 606
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 int call_argc = -1); 786 int call_argc = -1);
796 787
797 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); 788 static void PatchDebugBreakSlot(Address pc, Handle<Code> code);
798 static void ClearDebugBreakSlot(Address pc); 789 static void ClearDebugBreakSlot(Address pc);
799 }; 790 };
800 791
801 792
802 } } // namespace v8::internal 793 } } // namespace v8::internal
803 794
804 #endif // V8_DEBUG_H_ 795 #endif // V8_DEBUG_H_
OLDNEW
« no previous file with comments | « no previous file | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698