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

Side by Side Diff: vm/handles.h

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 | « no previous file | vm/handles.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef VM_HANDLES_H_ 5 #ifndef VM_HANDLES_H_
6 #define VM_HANDLES_H_ 6 #define VM_HANDLES_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // NOHANDLESCOPE(isolate); 292 // NOHANDLESCOPE(isolate);
293 // .... 293 // ....
294 // ..... 294 // .....
295 // critical code that manipulates dart objects directly. 295 // critical code that manipulates dart objects directly.
296 // .... 296 // ....
297 // } 297 // }
298 #if defined(DEBUG) 298 #if defined(DEBUG)
299 class NoHandleScope : public StackResource { 299 class NoHandleScope : public StackResource {
300 public: 300 public:
301 explicit NoHandleScope(BaseIsolate* isolate); 301 explicit NoHandleScope(BaseIsolate* isolate);
302 NoHandleScope();
302 ~NoHandleScope(); 303 ~NoHandleScope();
303 304
304 private: 305 private:
305 DISALLOW_IMPLICIT_CONSTRUCTORS(NoHandleScope); 306 DISALLOW_COPY_AND_ASSIGN(NoHandleScope);
306 }; 307 };
307 #else // defined(DEBUG) 308 #else // defined(DEBUG)
308 class NoHandleScope : public ValueObject { 309 class NoHandleScope : public ValueObject {
309 public: 310 public:
310 explicit NoHandleScope(BaseIsolate* isolate) { } 311 explicit NoHandleScope(BaseIsolate* isolate) { }
312 NoHandleScope() { }
311 ~NoHandleScope() { } 313 ~NoHandleScope() { }
312 314
313 private: 315 private:
314 DISALLOW_IMPLICIT_CONSTRUCTORS(NoHandleScope); 316 DISALLOW_COPY_AND_ASSIGN(NoHandleScope);
315 }; 317 };
316 #endif // defined(DEBUG) 318 #endif // defined(DEBUG)
317 319
318 // Macro to start a no handles scope in the code. 320 // Macro to start a no handles scope in the code.
319 #define NOHANDLESCOPE(isolate) \ 321 #define NOHANDLESCOPE(isolate) \
320 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); 322 dart::NoHandleScope no_vm_internal_handles_scope_(isolate);
321 323
322 } // namespace dart 324 } // namespace dart
323 325
324 #endif // VM_HANDLES_H_ 326 #endif // VM_HANDLES_H_
OLDNEW
« no previous file with comments | « no previous file | vm/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698