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

Unified Diff: runtime/vm/handles.cc

Issue 8523013: Cache isolate in the StackTrace object to that we don't call (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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 | « runtime/vm/allocation.cc ('k') | runtime/vm/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/handles.cc
===================================================================
--- runtime/vm/handles.cc (revision 1423)
+++ runtime/vm/handles.cc (working copy)
@@ -70,45 +70,41 @@
HandleScope::HandleScope() : StackResource() {
- Isolate* isolate = Isolate::Current();
- ASSERT(isolate->no_handle_scope_depth() == 0);
- VMHandles* handles = isolate->current_zone()->handles();
+ ASSERT(isolate()->no_handle_scope_depth() == 0);
+ VMHandles* handles = isolate()->current_zone()->handles();
ASSERT(handles != NULL);
saved_handle_block_ = handles->scoped_blocks_;
saved_handle_slot_ = handles->scoped_blocks_->next_handle_slot();
#if defined(DEBUG)
- link_ = isolate->top_handle_scope();
- isolate->set_top_handle_scope(this);
+ link_ = isolate()->top_handle_scope();
+ isolate()->set_top_handle_scope(this);
#endif
}
HandleScope::~HandleScope() {
- Isolate* isolate = Isolate::Current();
- ASSERT(isolate->current_zone() != NULL);
- VMHandles* handles = isolate->current_zone()->handles();
+ ASSERT(isolate()->current_zone() != NULL);
+ VMHandles* handles = isolate()->current_zone()->handles();
ASSERT(handles != NULL);
handles->scoped_blocks_ = saved_handle_block_;
handles->scoped_blocks_->set_next_handle_slot(saved_handle_slot_);
#if defined(DEBUG)
handles->VerifyScopedHandleState();
handles->ZapFreeScopedHandles();
- ASSERT(isolate->top_handle_scope() == this);
- isolate->set_top_handle_scope(link_);
+ ASSERT(isolate()->top_handle_scope() == this);
+ isolate()->set_top_handle_scope(link_);
#endif
}
#if defined(DEBUG)
NoHandleScope::NoHandleScope() : StackResource() {
- Isolate* isolate = Isolate::Current();
- isolate->IncrementNoHandleScopeDepth();
+ isolate()->IncrementNoHandleScopeDepth();
}
NoHandleScope::~NoHandleScope() {
- Isolate* isolate = Isolate::Current();
- isolate->DecrementNoHandleScopeDepth();
+ isolate()->DecrementNoHandleScopeDepth();
}
#endif // defined(DEBUG)
« no previous file with comments | « runtime/vm/allocation.cc ('k') | runtime/vm/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698