From f5ea16084b0ada455912c541e804b3a1831c4cc0 Mon Sep 17 00:00:00 2001 From: "sgjesse@chromium.org" Date: Thu, 9 Oct 2008 07:37:36 +0000 Subject: Initialize string to the empty string to avoid 'undefinedXXX' when appending XXX. Format frame numbers with two digits when presenting the output from teh f command. BUG=1304224 Review URL: http://codereview.chromium.org/6079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3091 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/debugger/resources/debugger_shell.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chrome/browser/debugger/resources') diff --git a/chrome/browser/debugger/resources/debugger_shell.js b/chrome/browser/debugger/resources/debugger_shell.js index 6c798b4..a3671c3 100644 --- a/chrome/browser/debugger/resources/debugger_shell.js +++ b/chrome/browser/debugger/resources/debugger_shell.js @@ -183,7 +183,7 @@ DebugCommand.getSourceLocation = function(script, source, line, func) { // TODO(erikkay): take column into account as well if (source) source = "" + line + ": " + source; - var location; + var location = ''; if (func) { location = func + ", "; } @@ -533,7 +533,7 @@ DebugCommand.responseFrame_ = function(msg) { body = msg.body; loc = DebugCommand.getSourceLocation(body.func.script, body.sourceLineText, body.line, body.func.name); - print("#" + body.index + " " + loc[0]); + print("#" + (body.index <= 9 ? '0' : '') + body.index + " " + loc[0]); print(loc[1]); shell_.current_frame = body.index; shell_.current_line = loc[2]; -- cgit v1.1