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

Side by Side Diff: runtime/vm/verifier.cc

Issue 1212943010: Safer interface for heap iteration. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix release mode. Created 5 years, 5 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
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "vm/verifier.h" 5 #include "vm/verifier.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/dart_api_state.h" 9 #include "vm/dart_api_state.h"
10 #include "vm/freelist.h" 10 #include "vm/freelist.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 73
74 void VerifyPointersVisitor::VerifyPointers(MarkExpectation mark_expectation) { 74 void VerifyPointersVisitor::VerifyPointers(MarkExpectation mark_expectation) {
75 NoSafepointScope no_safepoint; 75 NoSafepointScope no_safepoint;
76 Isolate* isolate = Isolate::Current(); 76 Isolate* isolate = Isolate::Current();
77 ObjectSet* allocated_set = 77 ObjectSet* allocated_set =
78 isolate->heap()->CreateAllocatedObjectSet(mark_expectation); 78 isolate->heap()->CreateAllocatedObjectSet(mark_expectation);
79 VerifyPointersVisitor visitor(isolate, allocated_set); 79 VerifyPointersVisitor visitor(isolate, allocated_set);
80 // Visit all strongly reachable objects. 80 // Visit all strongly reachable objects.
81 isolate->VisitObjectPointers(&visitor, 81 isolate->IterateObjectPointers(&visitor,
82 false, // skip prologue weak handles 82 false, // skip prologue weak handles
83 StackFrameIterator::kValidateFrames); 83 StackFrameIterator::kValidateFrames);
84 VerifyWeakPointersVisitor weak_visitor(&visitor); 84 VerifyWeakPointersVisitor weak_visitor(&visitor);
85 // Visit weak handles and prologue weak handles. 85 // Visit weak handles and prologue weak handles.
86 isolate->VisitWeakPersistentHandles(&weak_visitor, 86 isolate->VisitWeakPersistentHandles(&weak_visitor,
87 true); // visit prologue weak handles 87 true); // visit prologue weak handles
88 delete allocated_set; 88 delete allocated_set;
89 } 89 }
90 90
91 } // namespace dart 91 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698