Index: runtime/vm/verifier.cc |
diff --git a/runtime/vm/verifier.cc b/runtime/vm/verifier.cc |
index 0d62a583bbdb9e317985fd0501a4688aa4ae7063..37748b7593cf0adb2e6a99c0c2c30ab24d8b97ed 100644 |
--- a/runtime/vm/verifier.cc |
+++ b/runtime/vm/verifier.cc |
@@ -6,6 +6,7 @@ |
#include "vm/assert.h" |
#include "vm/dart.h" |
+#include "vm/dart_api_state.h" |
#include "vm/freelist.h" |
#include "vm/heap.h" |
#include "vm/isolate.h" |
@@ -39,11 +40,21 @@ void VerifyPointersVisitor::VisitPointers(RawObject** first, RawObject** last) { |
} |
+void VerifyWeakPointersVisitor::VisitHandle(uword addr) { |
+ WeakPersistentHandle* handle = reinterpret_cast<WeakPersistentHandle*>(addr); |
+ RawObject* raw_obj = handle->raw(); |
+ visitor_->VisitPointer(&raw_obj); |
+} |
+ |
+ |
void VerifyPointersVisitor::VerifyPointers() { |
NoGCScope no_gc; |
+ Isolate* isolate = Isolate::Current(); |
VerifyPointersVisitor visitor; |
- Isolate::Current()->VisitObjectPointers(&visitor, |
- StackFrameIterator::kValidateFrames); |
+ isolate->VisitObjectPointers(&visitor, |
+ StackFrameIterator::kValidateFrames); |
+ VerifyWeakPointersVisitor weak_visitor(&visitor); |
+ isolate->VisitWeakPersistentHandles(&weak_visitor); |
} |
} // namespace dart |