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

Unified Diff: src/handles-inl.h

Issue 16226007: Revert accidental change to SealHandleScope. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/handles.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/handles-inl.h
diff --git a/src/handles-inl.h b/src/handles-inl.h
index 8f001afc01119660eb223a4b0851928924e9214f..9d38f3891034695322c14b0d132b73f2db1eff8e 100644
--- a/src/handles-inl.h
+++ b/src/handles-inl.h
@@ -185,8 +185,8 @@ inline SealHandleScope::SealHandleScope(Isolate* isolate) : isolate_(isolate) {
isolate_->handle_scope_data();
// Shrink the current handle scope to make it impossible to do
// handle allocations without an explicit handle scope.
+ limit_ = current->limit;
current->limit = current->next;
-
level_ = current->level;
current->level = 0;
}
@@ -195,10 +195,12 @@ inline SealHandleScope::SealHandleScope(Isolate* isolate) : isolate_(isolate) {
inline SealHandleScope::~SealHandleScope() {
// Restore state in current handle scope to re-enable handle
// allocations.
- v8::ImplementationUtilities::HandleScopeData* data =
+ v8::ImplementationUtilities::HandleScopeData* current =
isolate_->handle_scope_data();
- ASSERT_EQ(0, data->level);
- data->level = level_;
+ ASSERT_EQ(0, current->level);
+ current->level = level_;
+ ASSERT_EQ(current->next, current->limit);
+ current->limit = limit_;
}
#endif
« no previous file with comments | « src/handles.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698