Chromium Code Reviews| 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/dartutils.h" | 6 #include "bin/dartutils.h" |
| 7 #include "bin/socket.h" | 7 #include "bin/socket.h" |
| 8 #include "bin/thread.h" | 8 #include "bin/thread.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 | 10 |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 426 msg.Printf("]}}"); | 426 msg.Printf("]}}"); |
| 427 SendMsg(&msg); | 427 SendMsg(&msg); |
| 428 } | 428 } |
| 429 | 429 |
| 430 | 430 |
| 431 static void FormatTextualValue(dart::TextBuffer* buf, Dart_Handle object) { | 431 static void FormatTextualValue(dart::TextBuffer* buf, Dart_Handle object) { |
| 432 Dart_Handle text; | 432 Dart_Handle text; |
| 433 if (Dart_IsNull(object)) { | 433 if (Dart_IsNull(object)) { |
| 434 text = Dart_Null(); | 434 text = Dart_Null(); |
| 435 } else { | 435 } else { |
| 436 Dart_ExceptionPauseInfo savedState = Dart_GetExceptionPauseInfo(); | |
| 437 | |
| 438 if (savedState != kNoPauseOnExceptions) { | |
|
hausner
2012/09/12 17:09:59
Please add
TODO(hausner): Check whether recursive
devoncarew
2012/09/12 17:20:52
Done.
| |
| 439 Dart_Handle res = Dart_SetExceptionPauseInfo(kNoPauseOnExceptions); | |
| 440 ASSERT_NOT_ERROR(res); | |
| 441 } | |
| 442 | |
| 436 text = Dart_ToString(object); | 443 text = Dart_ToString(object); |
| 444 | |
| 445 if (savedState != kNoPauseOnExceptions) { | |
| 446 Dart_Handle res = Dart_SetExceptionPauseInfo(savedState); | |
| 447 ASSERT_NOT_ERROR(res); | |
| 448 } | |
| 437 } | 449 } |
| 438 buf->Printf("\"text\":"); | 450 buf->Printf("\"text\":"); |
| 439 if (Dart_IsNull(text)) { | 451 if (Dart_IsNull(text)) { |
| 440 buf->Printf("null"); | 452 buf->Printf("null"); |
| 441 } else if (Dart_IsError(text)) { | 453 } else if (Dart_IsError(text)) { |
| 442 FormatErrorMsg(buf, text); | 454 FormatErrorMsg(buf, text); |
| 443 } else { | 455 } else { |
| 444 FormatEncodedString(buf, text); | 456 FormatEncodedString(buf, text); |
| 445 } | 457 } |
| 446 } | 458 } |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1066 DebuggerConnectionImpl::StartHandler(port_number); | 1078 DebuggerConnectionImpl::StartHandler(port_number); |
| 1067 Dart_SetBreakpointHandler(BreakpointHandler); | 1079 Dart_SetBreakpointHandler(BreakpointHandler); |
| 1068 Dart_SetBreakpointResolvedHandler(BptResolvedHandler); | 1080 Dart_SetBreakpointResolvedHandler(BptResolvedHandler); |
| 1069 Dart_SetExceptionThrownHandler(ExceptionThrownHandler); | 1081 Dart_SetExceptionThrownHandler(ExceptionThrownHandler); |
| 1070 } | 1082 } |
| 1071 | 1083 |
| 1072 | 1084 |
| 1073 DebuggerConnectionHandler::~DebuggerConnectionHandler() { | 1085 DebuggerConnectionHandler::~DebuggerConnectionHandler() { |
| 1074 CloseDbgConnection(); | 1086 CloseDbgConnection(); |
| 1075 } | 1087 } |
| OLD | NEW |