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

Unified Diff: src/handles-inl.h

Issue 4100005: Version 2.5.2 (Closed)
Patch Set: Created 10 years, 2 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.cc ('k') | src/heap.h » ('j') | 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 bf19f5f8648cf94740ad0328de036b388903565d..b31351256edfe7711bd574147bbc03b9c6a8f3d3 100644
--- a/src/handles-inl.h
+++ b/src/handles-inl.h
@@ -55,18 +55,22 @@ inline T* Handle<T>::operator*() const {
inline NoHandleAllocation::NoHandleAllocation() {
v8::ImplementationUtilities::HandleScopeData* current =
v8::ImplementationUtilities::CurrentHandleScope();
- extensions_ = current->extensions;
// Shrink the current handle scope to make it impossible to do
// handle allocations without an explicit handle scope.
current->limit = current->next;
- current->extensions = -1;
+
+ level_ = current->level;
+ current->level = 0;
}
inline NoHandleAllocation::~NoHandleAllocation() {
// Restore state in current handle scope to re-enable handle
// allocations.
- v8::ImplementationUtilities::CurrentHandleScope()->extensions = extensions_;
+ v8::ImplementationUtilities::HandleScopeData* current =
+ v8::ImplementationUtilities::CurrentHandleScope();
+ ASSERT_EQ(0, current->level);
+ current->level = level_;
}
#endif
« no previous file with comments | « src/handles.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698