Index: runtime/vm/visitor.h |
diff --git a/runtime/vm/visitor.h b/runtime/vm/visitor.h |
index cdd0c5bd03e0aa5c56116999f1fddd3e71ac5c58..20b48b38e2811b0c436c706e0436e353153de5bd 100644 |
--- a/runtime/vm/visitor.h |
+++ b/runtime/vm/visitor.h |
@@ -41,10 +41,19 @@ class ObjectPointerVisitor { |
// An object visitor interface. |
class ObjectVisitor { |
public: |
+ explicit ObjectVisitor(Isolate* isolate) : isolate_(isolate) {} |
+ |
virtual ~ObjectVisitor() {} |
+ Isolate* isolate() const { return isolate_; } |
+ |
// Invoked for each object. |
virtual void VisitObject(RawObject* obj) = 0; |
+ |
+ private: |
+ Isolate* isolate_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ObjectVisitor); |
}; |