Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 2dc01358fa3c28e80dd55e4a3e3dfabc79a8c08c..ed30d84cf1fa3fb9421f68326953ebff7458c71f 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -50,6 +50,7 @@ |
#include "src/tracing/tracing-category-observer.h" |
#include "src/v8.h" |
#include "src/version.h" |
+#include "src/visitors.h" |
#include "src/vm-state-inl.h" |
#include "src/wasm/wasm-module.h" |
#include "src/wasm/wasm-objects.h" |
@@ -200,8 +201,7 @@ Address Isolate::get_address_from_id(Isolate::AddressId id) { |
return isolate_addresses_[id]; |
} |
- |
-char* Isolate::Iterate(ObjectVisitor* v, char* thread_storage) { |
+char* Isolate::Iterate(RootVisitor* v, char* thread_storage) { |
ThreadLocalTop* thread = reinterpret_cast<ThreadLocalTop*>(thread_storage); |
Iterate(v, thread); |
return thread_storage + sizeof(ThreadLocalTop); |
@@ -213,19 +213,18 @@ void Isolate::IterateThread(ThreadVisitor* v, char* t) { |
v->VisitThread(this, thread); |
} |
- |
-void Isolate::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { |
+void Isolate::Iterate(RootVisitor* v, ThreadLocalTop* thread) { |
// Visit the roots from the top for a given thread. |
- v->VisitPointer(&thread->pending_exception_); |
- v->VisitPointer(&(thread->pending_message_obj_)); |
- v->VisitPointer(bit_cast<Object**>(&(thread->context_))); |
- v->VisitPointer(&thread->scheduled_exception_); |
+ v->VisitRootPointer(Root::kTop, &thread->pending_exception_); |
+ v->VisitRootPointer(Root::kTop, &thread->pending_message_obj_); |
+ v->VisitRootPointer(Root::kTop, bit_cast<Object**>(&(thread->context_))); |
+ v->VisitRootPointer(Root::kTop, &thread->scheduled_exception_); |
for (v8::TryCatch* block = thread->try_catch_handler(); |
block != NULL; |
block = block->next_) { |
- v->VisitPointer(bit_cast<Object**>(&(block->exception_))); |
- v->VisitPointer(bit_cast<Object**>(&(block->message_obj_))); |
+ v->VisitRootPointer(Root::kTop, bit_cast<Object**>(&(block->exception_))); |
+ v->VisitRootPointer(Root::kTop, bit_cast<Object**>(&(block->message_obj_))); |
} |
// Iterate over pointers on native execution stack. |
@@ -234,14 +233,12 @@ void Isolate::Iterate(ObjectVisitor* v, ThreadLocalTop* thread) { |
} |
} |
- |
-void Isolate::Iterate(ObjectVisitor* v) { |
+void Isolate::Iterate(RootVisitor* v) { |
ThreadLocalTop* current_t = thread_local_top(); |
Iterate(v, current_t); |
} |
- |
-void Isolate::IterateDeferredHandles(ObjectVisitor* visitor) { |
+void Isolate::IterateDeferredHandles(RootVisitor* visitor) { |
for (DeferredHandles* deferred = deferred_handles_head_; |
deferred != NULL; |
deferred = deferred->next_) { |