| OLD | NEW |
| 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/thread.h" | 8 #include "bin/thread.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 | 10 |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 ASSERT(in_msg != NULL); | 646 ASSERT(in_msg != NULL); |
| 647 MessageParser msg_parser(in_msg->buffer(), in_msg->buffer_len()); | 647 MessageParser msg_parser(in_msg->buffer(), in_msg->buffer_len()); |
| 648 int msg_id = msg_parser.MessageId(); | 648 int msg_id = msg_parser.MessageId(); |
| 649 Dart_Handle target; | 649 Dart_Handle target; |
| 650 | 650 |
| 651 if (msg_parser.HasParam("libraryId")) { | 651 if (msg_parser.HasParam("libraryId")) { |
| 652 in_msg->SendErrorReply(msg_id, | 652 in_msg->SendErrorReply(msg_id, |
| 653 "libararyId evaluation target not supported"); | 653 "libararyId evaluation target not supported"); |
| 654 return false; | 654 return false; |
| 655 } else if (msg_parser.HasParam("classId")) { | 655 } else if (msg_parser.HasParam("classId")) { |
| 656 in_msg->SendErrorReply(msg_id, | 656 intptr_t cls_id = msg_parser.GetIntParam("classId"); |
| 657 "classId evaluation target not supported"); | 657 target = Dart_GetClassFromId(cls_id); |
| 658 return false; | |
| 659 } else if (msg_parser.HasParam("objectId")) { | 658 } else if (msg_parser.HasParam("objectId")) { |
| 660 intptr_t obj_id = msg_parser.GetIntParam("objectId"); | 659 intptr_t obj_id = msg_parser.GetIntParam("objectId"); |
| 661 target = Dart_GetCachedObject(obj_id); | 660 target = Dart_GetCachedObject(obj_id); |
| 662 } else { | 661 } else { |
| 663 in_msg->SendErrorReply(msg_id, "illegal evaluation target"); | 662 in_msg->SendErrorReply(msg_id, "illegal evaluation target"); |
| 664 return false; | 663 return false; |
| 665 } | 664 } |
| 666 | 665 |
| 667 if (Dart_IsError(target)) { | 666 if (Dart_IsError(target)) { |
| 668 in_msg->SendErrorReply(msg_id, Dart_GetError(target)); | 667 in_msg->SendErrorReply(msg_id, Dart_GetError(target)); |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 } else { | 1302 } else { |
| 1304 ASSERT(kind == kShutdown); | 1303 ASSERT(kind == kShutdown); |
| 1305 RemoveIsolateMsgQueue(isolate_id); | 1304 RemoveIsolateMsgQueue(isolate_id); |
| 1306 } | 1305 } |
| 1307 } | 1306 } |
| 1308 Dart_ExitScope(); | 1307 Dart_ExitScope(); |
| 1309 } | 1308 } |
| 1310 | 1309 |
| 1311 } // namespace bin | 1310 } // namespace bin |
| 1312 } // namespace dart | 1311 } // namespace dart |
| OLD | NEW |