summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-02 14:51:45 +0000
committeryurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-02 14:51:45 +0000
commit4e744f363cf16dc0e1fc7762f901721e4e249cda (patch)
tree89310acf945735efff79903d677c905babe1939f
parentcad26edcdccf0cc36afab1e8584ff165460373e0 (diff)
downloadchromium_src-4e744f363cf16dc0e1fc7762f901721e4e249cda.zip
chromium_src-4e744f363cf16dc0e1fc7762f901721e4e249cda.tar.gz
chromium_src-4e744f363cf16dc0e1fc7762f901721e4e249cda.tar.bz2
Added trivial exception event handler that prints message to the Console and resumes the script execution.
Review URL: http://codereview.chromium.org/59005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13010 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/devtools/js/debugger_agent.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/glue/devtools/js/debugger_agent.js b/webkit/glue/devtools/js/debugger_agent.js
index 401c998..125abc6 100644
--- a/webkit/glue/devtools/js/debugger_agent.js
+++ b/webkit/glue/devtools/js/debugger_agent.js
@@ -223,6 +223,8 @@ devtools.DebuggerAgent.prototype.handleDebuggerOutput_ = function(output) {
if (msg.getType() == 'event') {
if (msg.getEvent() == 'break') {
this.handleBreakEvent_(msg);
+ } else if (msg.getEvent() == 'exception') {
+ this.handleExceptionEvent_(msg);
}
} else if (msg.getType() == 'response') {
if (msg.getCommand() == 'scripts') {
@@ -259,6 +261,17 @@ devtools.DebuggerAgent.prototype.handleBreakEvent_ = function(msg) {
/**
* @param {devtools.DebuggerMessage} msg
*/
+devtools.DebuggerAgent.prototype.handleExceptionEvent_ = function(msg) {
+ var body = msg.getBody();
+ debugPrint('Uncaught exception in ' + body.script.name + ':' +
+ body.sourceLine + '\n' + body.sourceLineText);
+ this.resumeExecution();
+};
+
+
+/**
+ * @param {devtools.DebuggerMessage} msg
+ */
devtools.DebuggerAgent.prototype.handleScriptsResponse_ = function(msg) {
var scripts = msg.getBody();
for (var i = 0; i < scripts.length; i++) {