| Index: runtime/vm/object_test.cc
|
| diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
|
| index 0b84430850c7ac80bd8b8bd026db4d175375cda5..29b5f575805691d5bb746142b7deb670348621cc 100644
|
| --- a/runtime/vm/object_test.cc
|
| +++ b/runtime/vm/object_test.cc
|
| @@ -4067,8 +4067,11 @@ ISOLATE_UNIT_TEST_CASE(PrintJSON) {
|
| Heap* heap = Isolate::Current()->heap();
|
| heap->CollectAllGarbage();
|
| GrowableArray<Object*> objects;
|
| - ObjectAccumulator acc(&objects);
|
| - heap->IterateObjects(&acc);
|
| + {
|
| + HeapIterationScope iteration(Thread::Current());
|
| + ObjectAccumulator acc(&objects);
|
| + iteration.IterateObjects(&acc);
|
| + }
|
| for (intptr_t i = 0; i < objects.length(); ++i) {
|
| JSONStream js;
|
| objects[i]->PrintJSON(&js, false);
|
|
|