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

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

Issue 23514020: Evaluation of expression in context of library top-level (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « no previous file | runtime/include/dart_debugger_api.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/thread.h" 8 #include "bin/thread.h"
9 #include "bin/utils.h" 9 #include "bin/utils.h"
10 10
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 } 641 }
642 642
643 643
644 bool DbgMessage::HandleEvaluateExprCmd(DbgMessage* in_msg) { 644 bool DbgMessage::HandleEvaluateExprCmd(DbgMessage* in_msg) {
645 ASSERT(in_msg != NULL); 645 ASSERT(in_msg != NULL);
646 MessageParser msg_parser(in_msg->buffer(), in_msg->buffer_len()); 646 MessageParser msg_parser(in_msg->buffer(), in_msg->buffer_len());
647 int msg_id = msg_parser.MessageId(); 647 int msg_id = msg_parser.MessageId();
648 Dart_Handle target; 648 Dart_Handle target;
649 649
650 if (msg_parser.HasParam("libraryId")) { 650 if (msg_parser.HasParam("libraryId")) {
651 in_msg->SendErrorReply(msg_id, 651 intptr_t lib_id = msg_parser.GetIntParam("libraryId");
652 "libararyId evaluation target not supported"); 652 target = Dart_GetLibraryFromId(lib_id);
653 return false;
654 } else if (msg_parser.HasParam("classId")) { 653 } else if (msg_parser.HasParam("classId")) {
655 intptr_t cls_id = msg_parser.GetIntParam("classId"); 654 intptr_t cls_id = msg_parser.GetIntParam("classId");
656 target = Dart_GetClassFromId(cls_id); 655 target = Dart_GetClassFromId(cls_id);
657 } else if (msg_parser.HasParam("objectId")) { 656 } else if (msg_parser.HasParam("objectId")) {
658 intptr_t obj_id = msg_parser.GetIntParam("objectId"); 657 intptr_t obj_id = msg_parser.GetIntParam("objectId");
659 target = Dart_GetCachedObject(obj_id); 658 target = Dart_GetCachedObject(obj_id);
660 } else { 659 } else {
661 in_msg->SendErrorReply(msg_id, "illegal evaluation target"); 660 in_msg->SendErrorReply(msg_id, "illegal evaluation target");
662 return false; 661 return false;
663 } 662 }
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 } else { 1300 } else {
1302 ASSERT(kind == kShutdown); 1301 ASSERT(kind == kShutdown);
1303 RemoveIsolateMsgQueue(isolate_id); 1302 RemoveIsolateMsgQueue(isolate_id);
1304 } 1303 }
1305 } 1304 }
1306 Dart_ExitScope(); 1305 Dart_ExitScope();
1307 } 1306 }
1308 1307
1309 } // namespace bin 1308 } // namespace bin
1310 } // namespace dart 1309 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698