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

Side by Side Diff: runtime/bin/dbg_message.cc

Issue 471743002: - Make sure that the threads for dart::bin are in the correct namespace. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/dbg_message.h ('k') | runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/dbg_connection.h" 5 #include "bin/dbg_connection.h"
6 #include "bin/dbg_message.h" 6 #include "bin/dbg_message.h"
7 #include "bin/dartutils.h" 7 #include "bin/dartutils.h"
8 #include "bin/lockers.h" 8 #include "bin/lockers.h"
9 #include "bin/thread.h" 9 #include "bin/thread.h"
10 #include "bin/utils.h" 10 #include "bin/utils.h"
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 if (Dart_HandleServiceMessages()) { 1099 if (Dart_HandleServiceMessages()) {
1100 break; 1100 break;
1101 } 1101 }
1102 1102
1103 // Handle all available debug messages, up to a resume request. 1103 // Handle all available debug messages, up to a resume request.
1104 if (HandlePendingMessages()) { 1104 if (HandlePendingMessages()) {
1105 break; 1105 break;
1106 } 1106 }
1107 1107
1108 // Wait for more debug or vm service messages. 1108 // Wait for more debug or vm service messages.
1109 dart::Monitor::WaitResult res = ml.Wait(); 1109 Monitor::WaitResult res = ml.Wait();
1110 ASSERT(res == dart::Monitor::kNotified); 1110 ASSERT(res == Monitor::kNotified);
1111 } 1111 }
1112 Dart_SetMessageNotifyCallback(NULL); 1112 Dart_SetMessageNotifyCallback(NULL);
1113 is_interrupted_ = false; 1113 is_interrupted_ = false;
1114 is_running_ = true; 1114 is_running_ = true;
1115 } 1115 }
1116 1116
1117 1117
1118 void DbgMsgQueue::InterruptIsolate() { 1118 void DbgMsgQueue::InterruptIsolate() {
1119 Dart_Isolate isolate = Dart_GetIsolate(isolate_id_); 1119 Dart_Isolate isolate = Dart_GetIsolate(isolate_id_);
1120 MonitorLocker ml(&msg_queue_lock_); 1120 MonitorLocker ml(&msg_queue_lock_);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 msg.Printf("\"reason\": \"shutdown\", "); 1200 msg.Printf("\"reason\": \"shutdown\", ");
1201 } 1201 }
1202 msg.Printf("\"id\": %" Pd64 " ", isolate_id); 1202 msg.Printf("\"id\": %" Pd64 " ", isolate_id);
1203 msg.Printf("}}"); 1203 msg.Printf("}}");
1204 } 1204 }
1205 DebuggerConnectionHandler::BroadcastMsg(&msg); 1205 DebuggerConnectionHandler::BroadcastMsg(&msg);
1206 } 1206 }
1207 1207
1208 1208
1209 DbgMsgQueue* DbgMsgQueueList::list_ = NULL; 1209 DbgMsgQueue* DbgMsgQueueList::list_ = NULL;
1210 dart::Mutex* DbgMsgQueueList::msg_queue_list_lock_ = new dart::Mutex(); 1210 Mutex* DbgMsgQueueList::msg_queue_list_lock_ = new Mutex();
1211 1211
1212 1212
1213 void DbgMsgQueueList::Initialize() { 1213 void DbgMsgQueueList::Initialize() {
1214 // Setup handlers for isolate events, breakpoints, exceptions and 1214 // Setup handlers for isolate events, breakpoints, exceptions and
1215 // delayed breakpoints. 1215 // delayed breakpoints.
1216 Dart_SetIsolateEventHandler(IsolateEventHandler); 1216 Dart_SetIsolateEventHandler(IsolateEventHandler);
1217 Dart_SetPausedEventHandler(PausedEventHandler); 1217 Dart_SetPausedEventHandler(PausedEventHandler);
1218 Dart_SetBreakpointResolvedHandler(BptResolvedHandler); 1218 Dart_SetBreakpointResolvedHandler(BptResolvedHandler);
1219 Dart_SetExceptionThrownHandler(ExceptionThrownHandler); 1219 Dart_SetExceptionThrownHandler(ExceptionThrownHandler);
1220 } 1220 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 } else { 1411 } else {
1412 ASSERT(kind == kShutdown); 1412 ASSERT(kind == kShutdown);
1413 RemoveIsolateMsgQueue(isolate_id); 1413 RemoveIsolateMsgQueue(isolate_id);
1414 } 1414 }
1415 } 1415 }
1416 Dart_ExitScope(); 1416 Dart_ExitScope();
1417 } 1417 }
1418 1418
1419 } // namespace bin 1419 } // namespace bin
1420 } // namespace dart 1420 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dbg_message.h ('k') | runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698