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

Unified Diff: runtime/vm/stack_frame_test.cc

Issue 2845053003: Fix asserts in StackFrameIterator which were effectively disabled (Closed)
Patch Set: Add StackFrameIterator::{ValidationPolicy,CrossThreadPolicy} enums Created 3 years, 8 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/stack_frame.cc ('k') | runtime/vm/stack_trace.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 907e94562f17a80d01fb8052b5df0b48533d7fe0..a76fe61b8eef6abc21a7638fd52965abf43b5f64 100644
--- a/runtime/vm/stack_frame_test.cc
+++ b/runtime/vm/stack_frame_test.cc
@@ -18,7 +18,9 @@ namespace dart {
// Unit test for empty stack frame iteration.
ISOLATE_UNIT_TEST_CASE(EmptyStackFrameIteration) {
- StackFrameIterator iterator(StackFrameIterator::kValidateFrames);
+ StackFrameIterator iterator(StackFrameIterator::kValidateFrames,
+ Thread::Current(),
+ StackFrameIterator::kNoCrossThreadIteration);
EXPECT(!iterator.HasNextFrame());
EXPECT(iterator.NextFrame() == NULL);
VerifyPointersVisitor::VerifyPointers();
@@ -27,7 +29,8 @@ ISOLATE_UNIT_TEST_CASE(EmptyStackFrameIteration) {
// Unit test for empty dart stack frame iteration.
ISOLATE_UNIT_TEST_CASE(EmptyDartStackFrameIteration) {
- DartFrameIterator iterator;
+ DartFrameIterator iterator(Thread::Current(),
+ StackFrameIterator::kNoCrossThreadIteration);
EXPECT(iterator.NextFrame() == NULL);
VerifyPointersVisitor::VerifyPointers();
}
@@ -51,7 +54,9 @@ void FUNCTION_NAME(StackFrame_equals)(Dart_NativeArguments args) {
void FUNCTION_NAME(StackFrame_frameCount)(Dart_NativeArguments args) {
int count = 0;
- StackFrameIterator frames(StackFrameIterator::kValidateFrames);
+ StackFrameIterator frames(StackFrameIterator::kValidateFrames,
+ Thread::Current(),
+ StackFrameIterator::kNoCrossThreadIteration);
while (frames.NextFrame() != NULL) {
count += 1; // Count the frame.
}
@@ -63,7 +68,8 @@ void FUNCTION_NAME(StackFrame_frameCount)(Dart_NativeArguments args) {
void FUNCTION_NAME(StackFrame_dartFrameCount)(Dart_NativeArguments args) {
int count = 0;
- DartFrameIterator frames;
+ DartFrameIterator frames(Thread::Current(),
+ StackFrameIterator::kNoCrossThreadIteration);
while (frames.NextFrame() != NULL) {
count += 1; // Count the dart frame.
}
@@ -84,7 +90,8 @@ void FUNCTION_NAME(StackFrame_validateFrame)(Dart_NativeArguments args) {
String::CheckedHandle(Api::UnwrapHandle(name)).ToCString();
int frame_index = frame_index_smi.Value();
int count = 0;
- DartFrameIterator frames;
+ DartFrameIterator frames(Thread::Current(),
+ StackFrameIterator::kNoCrossThreadIteration);
StackFrame* frame = frames.NextFrame();
while (frame != NULL) {
if (count == frame_index) {
« no previous file with comments | « runtime/vm/stack_frame.cc ('k') | runtime/vm/stack_trace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698