| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index a0990efd76340ac7bdca7d9ef79fce23a6ba3df0..85c51d06ddbf44249f3fd8fec912b96a2002eeed 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -10175,8 +10175,7 @@ char* HandleScopeImplementer::RestoreThread(char* storage) {
|
| return storage + ArchiveSpacePerThread();
|
| }
|
|
|
| -
|
| -void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
|
| +void HandleScopeImplementer::IterateThis(RootVisitor* v) {
|
| #ifdef DEBUG
|
| bool found_block_before_deferred = false;
|
| #endif
|
| @@ -10186,13 +10185,14 @@ void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
|
| if (last_handle_before_deferred_block_ != NULL &&
|
| (last_handle_before_deferred_block_ <= &block[kHandleBlockSize]) &&
|
| (last_handle_before_deferred_block_ >= block)) {
|
| - v->VisitPointers(block, last_handle_before_deferred_block_);
|
| + v->VisitRootPointers(Root::kHandleScope, block,
|
| + last_handle_before_deferred_block_);
|
| DCHECK(!found_block_before_deferred);
|
| #ifdef DEBUG
|
| found_block_before_deferred = true;
|
| #endif
|
| } else {
|
| - v->VisitPointers(block, &block[kHandleBlockSize]);
|
| + v->VisitRootPointers(Root::kHandleScope, block, &block[kHandleBlockSize]);
|
| }
|
| }
|
|
|
| @@ -10201,30 +10201,30 @@ void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
|
|
|
| // Iterate over live handles in the last block (if any).
|
| if (!blocks()->is_empty()) {
|
| - v->VisitPointers(blocks()->last(), handle_scope_data_.next);
|
| + v->VisitRootPointers(Root::kHandleScope, blocks()->last(),
|
| + handle_scope_data_.next);
|
| }
|
|
|
| List<Context*>* context_lists[2] = { &saved_contexts_, &entered_contexts_};
|
| for (unsigned i = 0; i < arraysize(context_lists); i++) {
|
| if (context_lists[i]->is_empty()) continue;
|
| Object** start = reinterpret_cast<Object**>(&context_lists[i]->first());
|
| - v->VisitPointers(start, start + context_lists[i]->length());
|
| + v->VisitRootPointers(Root::kHandleScope, start,
|
| + start + context_lists[i]->length());
|
| }
|
| if (microtask_context_) {
|
| - Object** start = reinterpret_cast<Object**>(µtask_context_);
|
| - v->VisitPointers(start, start + 1);
|
| + v->VisitRootPointer(Root::kHandleScope,
|
| + reinterpret_cast<Object**>(µtask_context_));
|
| }
|
| }
|
|
|
| -
|
| -void HandleScopeImplementer::Iterate(ObjectVisitor* v) {
|
| +void HandleScopeImplementer::Iterate(RootVisitor* v) {
|
| HandleScopeData* current = isolate_->handle_scope_data();
|
| handle_scope_data_ = *current;
|
| IterateThis(v);
|
| }
|
|
|
| -
|
| -char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
|
| +char* HandleScopeImplementer::Iterate(RootVisitor* v, char* storage) {
|
| HandleScopeImplementer* scope_implementer =
|
| reinterpret_cast<HandleScopeImplementer*>(storage);
|
| scope_implementer->IterateThis(v);
|
| @@ -10277,17 +10277,17 @@ DeferredHandles::~DeferredHandles() {
|
| }
|
| }
|
|
|
| -
|
| -void DeferredHandles::Iterate(ObjectVisitor* v) {
|
| +void DeferredHandles::Iterate(RootVisitor* v) {
|
| DCHECK(!blocks_.is_empty());
|
|
|
| DCHECK((first_block_limit_ >= blocks_.first()) &&
|
| (first_block_limit_ <= &(blocks_.first())[kHandleBlockSize]));
|
|
|
| - v->VisitPointers(blocks_.first(), first_block_limit_);
|
| + v->VisitRootPointers(Root::kHandleScope, blocks_.first(), first_block_limit_);
|
|
|
| for (int i = 1; i < blocks_.length(); i++) {
|
| - v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
|
| + v->VisitRootPointers(Root::kHandleScope, blocks_[i],
|
| + &blocks_[i][kHandleBlockSize]);
|
| }
|
| }
|
|
|
|
|