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

Unified Diff: runtime/vm/stack_frame_test.cc

Issue 2995543004: [vm, gc] Require a safepoint for heap iteration. (Closed)
Patch Set: explicit-thread Created 3 years, 4 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/service.cc ('k') | runtime/vm/symbols.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame_test.cc
diff --git a/runtime/vm/stack_frame_test.cc b/runtime/vm/stack_frame_test.cc
index 7adb82ea60c71eaa4fb0bda48a152ea3ad6eb551..1ea01f44717352b74918f06ba7c5cda3c29483c5 100644
--- a/runtime/vm/stack_frame_test.cc
+++ b/runtime/vm/stack_frame_test.cc
@@ -56,7 +56,10 @@ void FUNCTION_NAME(StackFrame_frameCount)(Dart_NativeArguments args) {
while (frames.NextFrame() != NULL) {
count += 1; // Count the frame.
}
- VerifyPointersVisitor::VerifyPointers();
+ {
+ TransitionNativeToVM transition(Thread::Current());
+ VerifyPointersVisitor::VerifyPointers();
+ }
NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
arguments->SetReturn(Object::Handle(Smi::New(count)));
}
@@ -68,7 +71,10 @@ void FUNCTION_NAME(StackFrame_dartFrameCount)(Dart_NativeArguments args) {
while (frames.NextFrame() != NULL) {
count += 1; // Count the dart frame.
}
- VerifyPointersVisitor::VerifyPointers();
+ {
+ TransitionNativeToVM transition(Thread::Current());
+ VerifyPointersVisitor::VerifyPointers();
+ }
NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
arguments->SetReturn(Object::Handle(Smi::New(count)));
}
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698