summaryrefslogtreecommitdiff
path: root/deps/v8/src/handles-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/handles-inl.h')
-rw-r--r--deps/v8/src/handles-inl.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/deps/v8/src/handles-inl.h b/deps/v8/src/handles-inl.h
index bf19f5f864..b31351256e 100644
--- a/deps/v8/src/handles-inl.h
+++ b/deps/v8/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