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

Unified Diff: src/api.cc

Issue 23672059: HandleScopeImplementer::entered_contexts_ should not store handles (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 3030b8a1e03879085f6d801682c8ac4839136d3a..7d2657387fd0b3cec4e34f2c340b518d38b6a8e9 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7426,9 +7426,11 @@ void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
v->VisitPointers(blocks()->last(), handle_scope_data_.next);
}
- if (!saved_contexts_.is_empty()) {
- Object** start = reinterpret_cast<Object**>(&saved_contexts_.first());
- v->VisitPointers(start, start + saved_contexts_.length());
+ List<Context*>* context_lists[2] = { &saved_contexts_, &entered_contexts_};
+ for (unsigned i = 0; i < ARRAY_SIZE(context_lists); i++) {
+ if (context_lists[i]->is_empty()) continue;
+ Object** start = reinterpret_cast<Object**>(&context_lists[i]->first());
Michael Starzinger 2013/09/24 11:30:46 Better use context_lists[i]->ToVector().start() in
+ v->VisitPointers(start, start + context_lists[i]->length());
}
}
« no previous file with comments | « src/api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698