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

Unified Diff: runtime/vm/verifier.cc

Issue 9655011: Implement prologue weak persistent handles. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: final revision Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/verifier.cc
diff --git a/runtime/vm/verifier.cc b/runtime/vm/verifier.cc
index adb53fa8df6176be2bef0f246d64c2c0eb2964d9..6aa7bd52bad93339e05b204e8b2cf53399199051 100644
--- a/runtime/vm/verifier.cc
+++ b/runtime/vm/verifier.cc
@@ -41,7 +41,8 @@ void VerifyPointersVisitor::VisitPointers(RawObject** first, RawObject** last) {
void VerifyWeakPointersVisitor::VisitHandle(uword addr) {
- WeakPersistentHandle* handle = reinterpret_cast<WeakPersistentHandle*>(addr);
+ FinalizablePersistentHandle* handle =
+ reinterpret_cast<FinalizablePersistentHandle*>(addr);
RawObject* raw_obj = handle->raw();
visitor_->VisitPointer(&raw_obj);
}
@@ -51,10 +52,14 @@ void VerifyPointersVisitor::VerifyPointers() {
NoGCScope no_gc;
Isolate* isolate = Isolate::Current();
VerifyPointersVisitor visitor;
+ // Visit all strongly reachable objects.
isolate->VisitObjectPointers(&visitor,
+ false, // skip prologue weak handles
StackFrameIterator::kValidateFrames);
VerifyWeakPointersVisitor weak_visitor(&visitor);
- isolate->VisitWeakPersistentHandles(&weak_visitor);
+ // Visit weak handles and prologue weak handles.
+ isolate->VisitWeakPersistentHandles(&weak_visitor,
+ true); // visit prologue weak handles
}
} // namespace dart
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698