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

Unified Diff: runtime/vm/profiler_macos.cc

Issue 92123002: Fix race discovered by Valgrind (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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/profiler_linux.cc ('k') | runtime/vm/profiler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_macos.cc
diff --git a/runtime/vm/profiler_macos.cc b/runtime/vm/profiler_macos.cc
index f891d6e46335ae5843baa797b0a5b790370e94f9..e1ae39916e825a0bec3ee1e08cdfcadca0e2c527 100644
--- a/runtime/vm/profiler_macos.cc
+++ b/runtime/vm/profiler_macos.cc
@@ -133,10 +133,10 @@ void ProfilerManager::ThreadMain(uword parameters) {
if (FLAG_trace_profiled_isolates) {
OS::Print("ProfilerManager MacOS ready.\n");
}
- thread_running_ = true;
{
// Signal to main thread we are ready.
ScopedMonitor startup_lock(start_stop_monitor_);
+ thread_running_ = true;
startup_lock.Notify();
}
ScopedMonitor lock(monitor_);
@@ -148,10 +148,10 @@ void ProfilerManager::ThreadMain(uword parameters) {
if (FLAG_trace_profiled_isolates) {
OS::Print("ProfilerManager MacOS exiting.\n");
}
- thread_running_ = false;
{
// Signal to main thread we are exiting.
ScopedMonitor shutdown_lock(start_stop_monitor_);
+ thread_running_ = false;
shutdown_lock.Notify();
}
}
« no previous file with comments | « runtime/vm/profiler_linux.cc ('k') | runtime/vm/profiler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698