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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 474913004: - Account for number of pending tasks in old-space collections. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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
Index: runtime/vm/dart_api_impl_test.cc
===================================================================
--- runtime/vm/dart_api_impl_test.cc (revision 39381)
+++ runtime/vm/dart_api_impl_test.cc (working copy)
@@ -7192,7 +7192,7 @@
// Tell the other thread that shared_isolate is created.
Dart_Handle lib;
{
- sync->Enter();
+ MonitorLocker ml(sync);
char* error = NULL;
shared_isolate = Dart_CreateIsolate(NULL, NULL,
bin::snapshot_buffer,
@@ -7211,8 +7211,7 @@
Dart_SetNativeResolver(lib, &IsolateInterruptTestNativeLookup, NULL);
DART_CHECK_VALID(result);
- sync->Notify();
- sync->Exit();
+ ml.Notify();
}
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
@@ -7224,12 +7223,12 @@
Dart_ExitScope();
Dart_ShutdownIsolate();
- // Tell the other thread that we are done (don't use MonitorLocker
- // as there is no current isolate any more).
- sync->Enter();
- shared_isolate = NULL;
- sync->Notify();
- sync->Exit();
+ // Tell the other thread that we are done.
+ {
+ MonitorLocker ml(sync);
+ shared_isolate = NULL;
+ ml.Notify();
+ }
}
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/freelist.h » ('j') | runtime/vm/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698