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

Unified Diff: runtime/bin/dbg_message.cc

Issue 14298002: Deprecate old debugger breakpoint handler (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/dbg_message.h ('k') | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dbg_message.cc
===================================================================
--- runtime/bin/dbg_message.cc (revision 21556)
+++ runtime/bin/dbg_message.cc (working copy)
@@ -979,14 +979,18 @@
}
-// TODO(hausner): Remove stack trace parameter once we remove the stack
-// trace from the paused event in the wire protocol.
-void DbgMsgQueue::SendBreakpointEvent(Dart_StackTrace trace) {
+void DbgMsgQueue::SendBreakpointEvent(const Dart_CodeLocation& location) {
dart::TextBuffer msg(128);
msg.Printf("{ \"event\": \"paused\", \"params\": { ");
msg.Printf("\"reason\": \"breakpoint\", ");
msg.Printf("\"isolateId\": %"Pd64"", isolate_id_);
- FormatLocationFromTrace(&msg, trace, ", ");
+ if (!Dart_IsNull(location.script_url)) {
+ ASSERT(Dart_IsString(location.script_url));
+ msg.Printf(",\"location\": { \"url\":");
+ FormatEncodedString(&msg, location.script_url);
+ msg.Printf(",\"libraryId\":%d,", location.library_id);
+ msg.Printf("\"tokenOffset\":%d}", location.token_pos);
+ }
msg.Printf("}}");
DebuggerConnectionHandler::BroadcastMsg(&msg);
}
@@ -1047,7 +1051,7 @@
// Setup handlers for isolate events, breakpoints, exceptions and
// delayed breakpoints.
Dart_SetIsolateEventHandler(IsolateEventHandler);
- Dart_SetBreakpointHandler(BreakpointHandler);
+ Dart_SetPausedEventHandler(PausedEventHandler);
Dart_SetBreakpointResolvedHandler(BptResolvedHandler);
Dart_SetExceptionThrownHandler(ExceptionThrownHandler);
}
@@ -1168,15 +1172,14 @@
}
-void DbgMsgQueueList::BreakpointHandler(Dart_IsolateId isolate_id,
- Dart_Breakpoint bpt,
- Dart_StackTrace trace) {
+void DbgMsgQueueList::PausedEventHandler(Dart_IsolateId isolate_id,
+ const Dart_CodeLocation& loc) {
DebuggerConnectionHandler::WaitForConnection();
Dart_EnterScope();
DbgMsgQueue* msg_queue = GetIsolateMsgQueue(isolate_id);
ASSERT(msg_queue != NULL);
msg_queue->SendQueuedMsgs();
- msg_queue->SendBreakpointEvent(trace);
+ msg_queue->SendBreakpointEvent(loc);
msg_queue->HandleMessages();
Dart_ExitScope();
}
« no previous file with comments | « runtime/bin/dbg_message.h ('k') | runtime/include/dart_debugger_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698