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

Unified Diff: runtime/vm/code_descriptors_test.cc

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo Created 4 years, 11 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/bootstrap.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698