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

Unified Diff: runtime/bin/dbg_message.cc

Issue 13771013: Add library id to code location object (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 | « no previous file | 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 21084)
+++ runtime/bin/dbg_message.cc (working copy)
@@ -400,14 +400,19 @@
Dart_Handle script_url;
intptr_t token_number = 0;
intptr_t line_number = 0;
+ intptr_t library_id = 0;
+ // TODO(hausner): Remove this call and line_number once Editor no
+ // longer depends on line number info.
res = Dart_ActivationFrameInfo(frame, NULL, NULL, &line_number, NULL);
ASSERT_NOT_ERROR(res);
- res = Dart_ActivationFrameGetLocation(frame, &script_url, &token_number);
+ res = Dart_ActivationFrameGetLocation(
+ frame, &script_url, &library_id, &token_number);
ASSERT_NOT_ERROR(res);
if (!Dart_IsNull(script_url)) {
ASSERT(Dart_IsString(script_url));
msg->Printf("\"location\": { \"url\":");
FormatEncodedString(msg, script_url);
+ msg->Printf("\"libraryId\":%"Pd"},", library_id);
msg->Printf(",\"tokenOffset\":%"Pd",", token_number);
msg->Printf("\"lineNumber\":%"Pd"},", line_number);
}
@@ -435,14 +440,18 @@
ASSERT(Dart_IsString(func_name));
msg->Printf("%s{\"functionName\":", (i > 0) ? "," : "");
FormatEncodedString(msg, func_name);
+ // TODO(hausner): Remove this libraryId field when Editor
+ // no longer depends on it.
msg->Printf(",\"libraryId\": %"Pd",", library_id);
- res = Dart_ActivationFrameGetLocation(frame, &script_url, &token_number);
+ res = Dart_ActivationFrameGetLocation(
+ frame, &script_url, NULL, &token_number);
ASSERT_NOT_ERROR(res);
if (!Dart_IsNull(script_url)) {
ASSERT(Dart_IsString(script_url));
msg->Printf("\"location\": { \"url\":");
FormatEncodedString(msg, script_url);
+ msg->Printf(",\"libraryId\": %"Pd",", library_id);
msg->Printf(",\"tokenOffset\":%"Pd",", token_number);
msg->Printf("\"lineNumber\":%"Pd"},", line_number);
}
« 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