Index: runtime/vm/code_descriptors_test.cc |
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc |
index 30cedd4b73a91e4c42658cbb97fd93d17c795ac3..37de3e489f005f8894e75f10b3047e3154e7175c 100644 |
--- a/runtime/vm/code_descriptors_test.cc |
+++ b/runtime/vm/code_descriptors_test.cc |
@@ -178,7 +178,10 @@ static void NativeFunc(Dart_NativeArguments args) { |
EXPECT_EQ(10, value); |
EXPECT_VALID(Dart_IntegerToInt64(k, &value)); |
EXPECT_EQ(20, value); |
- Isolate::Current()->heap()->CollectAllGarbage(); |
+ { |
+ TransitionNativeToVM transition(Thread::Current()); |
+ Isolate::Current()->heap()->CollectAllGarbage(); |
+ } |
} |
@@ -211,6 +214,8 @@ TEST_CASE(StackmapGC) { |
"}\n"; |
// First setup the script and compile the script. |
TestCase::LoadTestScript(kScriptChars, native_resolver); |
+ TransitionNativeToVM transition(thread); |
+ |
EXPECT(ClassFinalizer::ProcessPendingClasses()); |
const String& name = String::Handle(String::New(TestCase::url())); |
const Library& lib = Library::Handle(Library::LookupLibrary(name)); |
@@ -248,7 +253,8 @@ TEST_CASE(StackmapGC) { |
const PcDescriptors& descriptors = |
PcDescriptors::Handle(code.pc_descriptors()); |
int call_count = 0; |
- PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kUnoptStaticCall); |
+ PcDescriptors::Iterator iter(descriptors, |
+ RawPcDescriptors::kUnoptStaticCall); |
while (iter.MoveNext()) { |
stackmap_table_builder->AddEntry(iter.PcOffset(), stack_bitmap, 0); |
++call_count; |