File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -393,14 +393,23 @@ char* Debug::RestoreDebug(char* storage) {
393393
394394int Debug::ArchiveSpacePerThread () { return sizeof (ThreadLocal); }
395395
396- void Debug::Iterate (RootVisitor* v) {
396+ void Debug::Iterate (RootVisitor* v) { Iterate (v, &thread_local_); }
397+
398+ char * Debug::Iterate (RootVisitor* v, char * thread_storage) {
399+ ThreadLocal* thread_local_data =
400+ reinterpret_cast <ThreadLocal*>(thread_storage);
401+ Iterate (v, thread_local_data);
402+ return thread_storage + ArchiveSpacePerThread ();
403+ }
404+
405+ void Debug::Iterate (RootVisitor* v, ThreadLocal* thread_local_data) {
397406 v->VisitRootPointer (Root::kDebug , nullptr ,
398- FullObjectSlot (&thread_local_. return_value_ ));
407+ FullObjectSlot (&thread_local_data-> return_value_ ));
399408 v->VisitRootPointer (Root::kDebug , nullptr ,
400- FullObjectSlot (&thread_local_. suspended_generator_ ));
409+ FullObjectSlot (&thread_local_data-> suspended_generator_ ));
401410 v->VisitRootPointer (
402411 Root::kDebug , nullptr ,
403- FullObjectSlot (&thread_local_. ignore_step_into_function_ ));
412+ FullObjectSlot (&thread_local_data-> ignore_step_into_function_ ));
404413}
405414
406415DebugInfoListNode::DebugInfoListNode (Isolate* isolate, DebugInfo debug_info)
Original file line number Diff line number Diff line change @@ -392,6 +392,8 @@ class V8_EXPORT_PRIVATE Debug {
392392
393393 void RemoveBreakInfoAndMaybeFree (Handle<DebugInfo> debug_info);
394394
395+ static char * Iterate (RootVisitor* v, char * thread_storage);
396+
395397 private:
396398 explicit Debug (Isolate* isolate);
397399 ~Debug ();
@@ -546,6 +548,8 @@ class V8_EXPORT_PRIVATE Debug {
546548 bool break_on_next_function_call_;
547549 };
548550
551+ static void Iterate (RootVisitor* v, ThreadLocal* thread_local_data);
552+
549553 // Storage location for registers when handling debug break calls
550554 ThreadLocal thread_local_;
551555
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class ExecutionAccess;
1616class InterruptsScope ;
1717class Isolate ;
1818class Object ;
19+ class RootVisitor ;
1920
2021// StackGuard contains the handling of the limits that are used to limit the
2122// number of nested invocations of JavaScript and the stack size used in each
@@ -88,6 +89,10 @@ class V8_EXPORT_PRIVATE StackGuard final {
8889
8990 static constexpr int kSizeInBytes = 7 * kSystemPointerSize ;
9091
92+ static char * Iterate (RootVisitor* v, char * thread_storage) {
93+ return thread_storage + ArchiveSpacePerThread ();
94+ }
95+
9196 private:
9297 bool CheckInterrupt (InterruptFlag flag);
9398 void RequestInterrupt (InterruptFlag flag);
Original file line number Diff line number Diff line change 88#include " src/debug/debug.h"
99#include " src/execution/execution.h"
1010#include " src/execution/isolate-inl.h"
11+ #include " src/execution/stack-guard.h"
1112#include " src/init/bootstrapper.h"
1213#include " src/objects/visitors.h"
1314#include " src/regexp/regexp-stack.h"
@@ -298,6 +299,8 @@ void ThreadManager::Iterate(RootVisitor* v) {
298299 data = HandleScopeImplementer::Iterate (v, data);
299300 data = isolate_->Iterate (v, data);
300301 data = Relocatable::Iterate (v, data);
302+ data = StackGuard::Iterate (v, data);
303+ data = Debug::Iterate (v, data);
301304 }
302305}
303306
You can’t perform that action at this time.
0 commit comments