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

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

Issue 1130753006: Hide Isolate pointer from embedder (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/dartutils.cc ('k') | runtime/bin/dbg_message.h » ('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/log.h" 9 #include "bin/log.h"
10 #include "bin/socket.h" 10 #include "bin/socket.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 handler->HandleMessages(); 448 handler->HandleMessages();
449 delete handler; 449 delete handler;
450 } 450 }
451 } 451 }
452 452
453 453
454 void DebuggerConnectionHandler::HandleInterruptCmd(DbgMessage* in_msg) { 454 void DebuggerConnectionHandler::HandleInterruptCmd(DbgMessage* in_msg) {
455 MessageParser msg_parser(in_msg->buffer(), in_msg->buffer_len()); 455 MessageParser msg_parser(in_msg->buffer(), in_msg->buffer_len());
456 int msg_id = msg_parser.MessageId(); 456 int msg_id = msg_parser.MessageId();
457 Dart_IsolateId isolate_id = msg_parser.GetInt64Param("isolateId"); 457 Dart_IsolateId isolate_id = msg_parser.GetInt64Param("isolateId");
458 if (isolate_id == ILLEGAL_ISOLATE_ID || Dart_GetIsolate(isolate_id) == NULL) { 458 if (isolate_id == DART_ILLEGAL_ISOLATE_ID ||
459 Dart_GetIsolate(isolate_id) == DART_ILLEGAL_ISOLATE) {
459 in_msg->SendErrorReply(msg_id, "Invalid isolate specified"); 460 in_msg->SendErrorReply(msg_id, "Invalid isolate specified");
460 return; 461 return;
461 } 462 }
462 if (!DbgMsgQueueList::InterruptIsolate(isolate_id)) { 463 if (!DbgMsgQueueList::InterruptIsolate(isolate_id)) {
463 in_msg->SendErrorReply(msg_id, "Invalid isolate specified"); 464 in_msg->SendErrorReply(msg_id, "Invalid isolate specified");
464 return; 465 return;
465 } 466 }
466 dart::TextBuffer msg(64); 467 dart::TextBuffer msg(64);
467 msg.Printf("{ \"id\": %d }", msg_id); 468 msg.Printf("{ \"id\": %d }", msg_id);
468 in_msg->SendReply(&msg); 469 in_msg->SendReply(&msg);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 508
508 509
509 bool DebuggerConnectionHandler::IsConnected() { 510 bool DebuggerConnectionHandler::IsConnected() {
510 // TODO(asiva): Support multiple debugger connections. 511 // TODO(asiva): Support multiple debugger connections.
511 // Return true if a connection has been established. 512 // Return true if a connection has been established.
512 return singleton_handler != NULL; 513 return singleton_handler != NULL;
513 } 514 }
514 515
515 } // namespace bin 516 } // namespace bin
516 } // namespace dart 517 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/dbg_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698