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

Unified Diff: runtime/vm/message_handler.cc

Issue 1317653003: Set paused_timestamp before notifying (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message_handler.cc
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index 77604e8d34a5fb9f22741a7e9afd5d0958dd1ce3..c0013e6fe3c0d893ae19d9536dcc3bae13484213 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -249,11 +249,11 @@ void MessageHandler::TaskCallback() {
// Temporarily drop the lock when calling out to NotifyPauseOnStart.
// This avoids a dead lock that can occur when this message handler
// tries to post a message while a message is being posted to it.
+ paused_on_start_ = true;
+ paused_timestamp_ = OS::GetCurrentTimeMillis();
monitor_.Exit();
NotifyPauseOnStart();
monitor_.Enter();
- paused_on_start_ = true;
- paused_timestamp_ = OS::GetCurrentTimeMillis();
}
HandleMessages(false, false);
if (pause_on_start()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698