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

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

Issue 10928149: Fix for http://code.google.com/p/dart/issues/detail?id=5085 - break-on-exceptions in the debugger c… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/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
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 // TODO(hausner): Check whether recursive/reentrant pauses on exceptions
439 // should be prevented in Debugger::SignalExceptionThrown() instead.
440 if (savedState != kNoPauseOnExceptions) {
441 Dart_Handle res = Dart_SetExceptionPauseInfo(kNoPauseOnExceptions);
442 ASSERT_NOT_ERROR(res);
443 }
444
436 text = Dart_ToString(object); 445 text = Dart_ToString(object);
446
447 if (savedState != kNoPauseOnExceptions) {
448 Dart_Handle res = Dart_SetExceptionPauseInfo(savedState);
449 ASSERT_NOT_ERROR(res);
450 }
437 } 451 }
438 buf->Printf("\"text\":"); 452 buf->Printf("\"text\":");
439 if (Dart_IsNull(text)) { 453 if (Dart_IsNull(text)) {
440 buf->Printf("null"); 454 buf->Printf("null");
441 } else if (Dart_IsError(text)) { 455 } else if (Dart_IsError(text)) {
442 FormatErrorMsg(buf, text); 456 FormatErrorMsg(buf, text);
443 } else { 457 } else {
444 FormatEncodedString(buf, text); 458 FormatEncodedString(buf, text);
445 } 459 }
446 } 460 }
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 DebuggerConnectionImpl::StartHandler(port_number); 1080 DebuggerConnectionImpl::StartHandler(port_number);
1067 Dart_SetBreakpointHandler(BreakpointHandler); 1081 Dart_SetBreakpointHandler(BreakpointHandler);
1068 Dart_SetBreakpointResolvedHandler(BptResolvedHandler); 1082 Dart_SetBreakpointResolvedHandler(BptResolvedHandler);
1069 Dart_SetExceptionThrownHandler(ExceptionThrownHandler); 1083 Dart_SetExceptionThrownHandler(ExceptionThrownHandler);
1070 } 1084 }
1071 1085
1072 1086
1073 DebuggerConnectionHandler::~DebuggerConnectionHandler() { 1087 DebuggerConnectionHandler::~DebuggerConnectionHandler() {
1074 CloseDbgConnection(); 1088 CloseDbgConnection();
1075 } 1089 }
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