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

Side by Side Diff: runtime/vm/handles.h

Issue 186003002: Pass in the isolate parameter to the weak persistent callback handler so that (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | « runtime/vm/gc_marker.cc ('k') | runtime/vm/isolate.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 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 58
59 // Forward declarations. 59 // Forward declarations.
60 class ObjectPointerVisitor; 60 class ObjectPointerVisitor;
61 61
62 DECLARE_FLAG(bool, verify_handles); 62 DECLARE_FLAG(bool, verify_handles);
63 DECLARE_DEBUG_FLAG(bool, trace_handles); 63 DECLARE_DEBUG_FLAG(bool, trace_handles);
64 64
65 class HandleVisitor { 65 class HandleVisitor {
66 public: 66 public:
67 explicit HandleVisitor(Isolate* isolate) : isolate_(isolate) {}
68 virtual ~HandleVisitor() {}
69
70 Isolate* isolate() const { return isolate_; }
71
67 virtual void VisitHandle(uword addr, bool is_prologue_weak) = 0; 72 virtual void VisitHandle(uword addr, bool is_prologue_weak) = 0;
68 73
69 virtual ~HandleVisitor() { 74 private:
70 } 75 Isolate* isolate_;
76
77 DISALLOW_IMPLICIT_CONSTRUCTORS(HandleVisitor);
71 }; 78 };
72 79
73 80
74 template <int kHandleSizeInWords, int kHandlesPerChunk, int kOffsetOfRawPtr> 81 template <int kHandleSizeInWords, int kHandlesPerChunk, int kOffsetOfRawPtr>
75 class Handles { 82 class Handles {
76 public: 83 public:
77 Handles() 84 Handles()
78 : zone_blocks_(NULL), 85 : zone_blocks_(NULL),
79 first_scoped_block_(NULL), 86 first_scoped_block_(NULL),
80 scoped_blocks_(&first_scoped_block_) { 87 scoped_blocks_(&first_scoped_block_) {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 }; 348 };
342 #endif // defined(DEBUG) 349 #endif // defined(DEBUG)
343 350
344 // Macro to start a no handles scope in the code. 351 // Macro to start a no handles scope in the code.
345 #define NOHANDLESCOPE(isolate) \ 352 #define NOHANDLESCOPE(isolate) \
346 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); 353 dart::NoHandleScope no_vm_internal_handles_scope_(isolate);
347 354
348 } // namespace dart 355 } // namespace dart
349 356
350 #endif // VM_HANDLES_H_ 357 #endif // VM_HANDLES_H_
OLDNEW
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698