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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 // longer depends on line number info. | 405 // longer depends on line number info. |
406 res = Dart_ActivationFrameInfo(frame, NULL, NULL, &line_number, NULL); | 406 res = Dart_ActivationFrameInfo(frame, NULL, NULL, &line_number, NULL); |
407 ASSERT_NOT_ERROR(res); | 407 ASSERT_NOT_ERROR(res); |
408 res = Dart_ActivationFrameGetLocation( | 408 res = Dart_ActivationFrameGetLocation( |
409 frame, &script_url, &library_id, &token_number); | 409 frame, &script_url, &library_id, &token_number); |
410 ASSERT_NOT_ERROR(res); | 410 ASSERT_NOT_ERROR(res); |
411 if (!Dart_IsNull(script_url)) { | 411 if (!Dart_IsNull(script_url)) { |
412 ASSERT(Dart_IsString(script_url)); | 412 ASSERT(Dart_IsString(script_url)); |
413 msg->Printf("\"location\": { \"url\":"); | 413 msg->Printf("\"location\": { \"url\":"); |
414 FormatEncodedString(msg, script_url); | 414 FormatEncodedString(msg, script_url); |
415 msg->Printf(",\"libraryId\":%"Pd"},", library_id); | 415 msg->Printf(",\"libraryId\":%"Pd",", library_id); |
416 msg->Printf("\"tokenOffset\":%"Pd",", token_number); | 416 msg->Printf("\"tokenOffset\":%"Pd",", token_number); |
417 msg->Printf("\"lineNumber\":%"Pd"},", line_number); | 417 msg->Printf("\"lineNumber\":%"Pd"},", line_number); |
418 } | 418 } |
419 } | 419 } |
420 | 420 |
421 | 421 |
422 static void FormatCallFrames(dart::TextBuffer* msg, Dart_StackTrace trace) { | 422 static void FormatCallFrames(dart::TextBuffer* msg, Dart_StackTrace trace) { |
423 intptr_t trace_len = 0; | 423 intptr_t trace_len = 0; |
424 Dart_Handle res = Dart_StackTraceLength(trace, &trace_len); | 424 Dart_Handle res = Dart_StackTraceLength(trace, &trace_len); |
425 ASSERT_NOT_ERROR(res); | 425 ASSERT_NOT_ERROR(res); |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 msg_queue->SendIsolateEvent(isolate_id, kind); | 1236 msg_queue->SendIsolateEvent(isolate_id, kind); |
1237 if (kind == kInterrupted) { | 1237 if (kind == kInterrupted) { |
1238 msg_queue->HandleMessages(); | 1238 msg_queue->HandleMessages(); |
1239 } else { | 1239 } else { |
1240 ASSERT(kind == kShutdown); | 1240 ASSERT(kind == kShutdown); |
1241 RemoveIsolateMsgQueue(isolate_id); | 1241 RemoveIsolateMsgQueue(isolate_id); |
1242 } | 1242 } |
1243 } | 1243 } |
1244 Dart_ExitScope(); | 1244 Dart_ExitScope(); |
1245 } | 1245 } |
OLD | NEW |