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

Unified Diff: test/debugger/test-api.js

Issue 2516343003: [debug-wrapper] migrate debug-backtrace from DCP. (Closed)
Patch Set: Created 4 years, 1 month 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 | « test/debugger/debug/debug-backtrace.js ('k') | test/mjsunit/debug-backtrace.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/debugger/test-api.js
diff --git a/test/debugger/test-api.js b/test/debugger/test-api.js
index f78b1171af005584399edd907a86d5682d543bd5..0ede8235e3de111a5d142a82da2b8ca494c3d0e5 100644
--- a/test/debugger/test-api.js
+++ b/test/debugger/test-api.js
@@ -314,9 +314,10 @@ class DebugWrapper {
}
receiveMessage(message) {
- if (printProtocolMessages) print(message);
-
const parsedMessage = JSON.parse(message);
+ if (printProtocolMessages) {
+ print(JSON.stringify(parsedMessage, undefined, 1));
+ }
if (parsedMessage.id !== undefined) {
this.receivedMessages.set(parsedMessage.id, parsedMessage);
}
@@ -607,6 +608,7 @@ class DebugWrapper {
const column = frame.location.columnNumber;
const loc = %ScriptLocationFromLine2(scriptid, line, column, 0);
const func = { name : () => frame.functionName };
+ const index = JSON.parse(frame.callFrameId).ordinal;
function allScopes() {
const scopes = [];
@@ -622,6 +624,7 @@ class DebugWrapper {
evaluate : (expr) => this.evaluateOnCallFrame(frame, expr),
functionName : () => frame.functionName,
func : () => func,
+ index : () => index,
localCount : () => this.execStateFrameLocalCount(frame),
localName : (ix) => this.execStateFrameLocalName(frame, ix),
localValue: (ix) => this.execStateFrameLocalValue(frame, ix),
« no previous file with comments | « test/debugger/debug/debug-backtrace.js ('k') | test/mjsunit/debug-backtrace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698