Reviewers: Michael Starzinger, Vyacheslav Egorov,
Description:
Only zapped used handles if a handle scope fits entirely within one handle
block
This should avoid zapping the same unused handles over and over again
when using many small nested handle scopes.
BUG=none
[email protected],[email protected]
Please review this at https://codereview.chromium.org/24359003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -4 lines):
M src/handles-inl.h
Index: src/handles-inl.h
diff --git a/src/handles-inl.h b/src/handles-inl.h
index
5b879d8f088e2491669095c628586299f8781f20..6b1983b55b66618846659c4336e8a6d51e766403
100644
--- a/src/handles-inl.h
+++ b/src/handles-inl.h
@@ -130,16 +130,17 @@ void HandleScope::CloseScope(Isolate* isolate,
v8::ImplementationUtilities::HandleScopeData* current =
isolate->handle_scope_data();
- current->next = prev_next;
+ std::swap(current->next, prev_next);
current->level--;
if (current->limit != prev_limit) {
current->limit = prev_limit;
DeleteExtensions(isolate);
- }
-
#ifdef ENABLE_EXTRA_CHECKS
- ZapRange(prev_next, prev_limit);
+ ZapRange(current->next, prev_limit);
+ } else {
+ ZapRange(current->next, prev_next);
#endif
+ }
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.