Index: runtime/vm/heap_test.cc |
diff --git a/runtime/vm/heap_test.cc b/runtime/vm/heap_test.cc |
index f52a81cdf73eeebe8448a79682ca823787ebf1be..c76297d6d2b99a97e36fc7d88a49e701513580a6 100644 |
--- a/runtime/vm/heap_test.cc |
+++ b/runtime/vm/heap_test.cc |
@@ -26,6 +26,7 @@ TEST_CASE(OldGC) { |
EXPECT_VALID(result); |
EXPECT(!Dart_IsNull(result)); |
EXPECT(Dart_IsList(result)); |
+ TransitionNativeToVM transition(thread); |
Isolate* isolate = Isolate::Current(); |
Heap* heap = isolate->heap(); |
heap->CollectGarbage(Heap::kOld); |
@@ -45,6 +46,7 @@ TEST_CASE(OldGC_Unsync) { |
EXPECT_VALID(result); |
EXPECT(!Dart_IsNull(result)); |
EXPECT(Dart_IsList(result)); |
+ TransitionNativeToVM transition(thread); |
Isolate* isolate = Isolate::Current(); |
Heap* heap = isolate->heap(); |
heap->CollectGarbage(Heap::kOld); |
@@ -64,6 +66,7 @@ TEST_CASE(LargeSweep) { |
EXPECT_VALID(result); |
EXPECT(!Dart_IsNull(result)); |
EXPECT(Dart_IsList(result)); |
+ TransitionNativeToVM transition(thread); |
Isolate* isolate = Isolate::Current(); |
Heap* heap = isolate->heap(); |
heap->CollectGarbage(Heap::kOld); |
@@ -115,6 +118,7 @@ TEST_CASE(ClassHeapStats) { |
Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL); |
EXPECT_VALID(result); |
EXPECT(!Dart_IsNull(result)); |
+ TransitionNativeToVM transition(thread); |
Library& lib = Library::Handle(); |
lib ^= Api::UnwrapHandle(h_lib); |
EXPECT(!lib.IsNull()); |