summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 09:40:58 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 09:40:58 +0000
commit1163ae0ebb052a816429295a092996a4980cdb33 (patch)
tree41ebd2cf1eb325e687959adc456f52fb270441e2 /webkit
parentde2a7201d8ab8bc261f9c7e1d6698aa8beaeb8c9 (diff)
downloadchromium_src-1163ae0ebb052a816429295a092996a4980cdb33.zip
chromium_src-1163ae0ebb052a816429295a092996a4980cdb33.tar.gz
chromium_src-1163ae0ebb052a816429295a092996a4980cdb33.tar.bz2
DevTools: Handle errors in evaluation response.
Review URL: http://codereview.chromium.org/159191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21268 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/devtools/js/debugger_agent.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/webkit/glue/devtools/js/debugger_agent.js b/webkit/glue/devtools/js/debugger_agent.js
index 19fd823..166254f 100644
--- a/webkit/glue/devtools/js/debugger_agent.js
+++ b/webkit/glue/devtools/js/debugger_agent.js
@@ -646,7 +646,6 @@ devtools.DebuggerAgent.prototype.handleDebuggerOutput_ = function(output) {
throw e;
}
-
if (msg.getType() == 'event') {
if (msg.getEvent() == 'break') {
this.handleBreakEvent_(msg);
@@ -1261,8 +1260,12 @@ devtools.CallFrame.doEvalInCallFrame =
'disable_break': false
},
function(response) {
- var body = response.getBody();
- callback(devtools.DebuggerAgent.formatObjectReference_(body));
+ if (response.isSuccess()) {
+ callback(devtools.DebuggerAgent.formatObjectReference_(
+ response.getBody()), false /* exception */);
+ } else {
+ callback(response.getMessage(), true /* exception */);
+ }
});
};
@@ -1368,8 +1371,7 @@ devtools.DebugCommand.prototype.toJSONProtocol = function() {
* @constructor
*/
devtools.DebuggerMessage = function(msg) {
- var jsExpression = '[' + msg + '][0]';
- this.packet_ = eval(jsExpression);
+ this.packet_ = JSON.parse(msg);
this.refs_ = [];
if (this.packet_.refs) {
for (var i = 0; i < this.packet_.refs.length; i++) {