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

Side by Side Diff: vm/handles.cc

Issue 10579035: - Use NoHandleScope in leaf methods (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « vm/handles.h ('k') | vm/raw_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/handles.h" 5 #include "vm/handles.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 #endif 96 #endif
97 } 97 }
98 98
99 99
100 #if defined(DEBUG) 100 #if defined(DEBUG)
101 NoHandleScope::NoHandleScope(BaseIsolate* isolate) : StackResource(isolate) { 101 NoHandleScope::NoHandleScope(BaseIsolate* isolate) : StackResource(isolate) {
102 isolate->IncrementNoHandleScopeDepth(); 102 isolate->IncrementNoHandleScopeDepth();
103 } 103 }
104 104
105 105
106 NoHandleScope::NoHandleScope() : StackResource(Isolate::Current()) {
107 isolate()->IncrementNoHandleScopeDepth();
108 }
109
110
106 NoHandleScope::~NoHandleScope() { 111 NoHandleScope::~NoHandleScope() {
107 isolate()->DecrementNoHandleScopeDepth(); 112 isolate()->DecrementNoHandleScopeDepth();
108 } 113 }
109 #endif // defined(DEBUG) 114 #endif // defined(DEBUG)
110 115
111 } // namespace dart 116 } // namespace dart
OLDNEW
« no previous file with comments | « vm/handles.h ('k') | vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698