summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 16:32:43 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 16:32:43 +0000
commit82f32d26c456bea4bf23eb56eff48073dc487feb (patch)
treeac607faec183976554cb0ea864df849b0e440f56
parent97a9254ba14d99ae120d240ab92bc4db69392ea3 (diff)
downloadchromium_src-82f32d26c456bea4bf23eb56eff48073dc487feb.zip
chromium_src-82f32d26c456bea4bf23eb56eff48073dc487feb.tar.gz
chromium_src-82f32d26c456bea4bf23eb56eff48073dc487feb.tar.bz2
Adds auto continue option on Debugger Agent to avoid pausing the.
Original review: http://codereview.chromium.org/395027. TBR=knorton Review URL: http://codereview.chromium.org/402014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32174 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/devtools/debugger_agent_impl.cc3
-rw-r--r--webkit/glue/devtools/debugger_agent_impl.h7
-rw-r--r--webkit/glue/devtools/debugger_agent_manager.cc6
-rw-r--r--webkit/glue/webdevtoolsagent_impl.cc1
4 files changed, 16 insertions, 1 deletions
diff --git a/webkit/glue/devtools/debugger_agent_impl.cc b/webkit/glue/devtools/debugger_agent_impl.cc
index 5ffa541..8957cb3 100644
--- a/webkit/glue/devtools/debugger_agent_impl.cc
+++ b/webkit/glue/devtools/debugger_agent_impl.cc
@@ -44,7 +44,8 @@ DebuggerAgentImpl::DebuggerAgentImpl(
: web_view_impl_(web_view_impl),
delegate_(delegate),
webdevtools_agent_(webdevtools_agent),
- profiler_log_position_(0) {
+ profiler_log_position_(0),
+ auto_continue_on_exception_(false) {
DebuggerAgentManager::DebugAttach(this);
}
diff --git a/webkit/glue/devtools/debugger_agent_impl.h b/webkit/glue/devtools/debugger_agent_impl.h
index 95ea2d8..412e898 100644
--- a/webkit/glue/devtools/debugger_agent_impl.h
+++ b/webkit/glue/devtools/debugger_agent_impl.h
@@ -49,6 +49,12 @@ class DebuggerAgentImpl : public DebuggerAgent {
void DebuggerOutput(const WebCore::String& out);
+ void set_auto_continue_on_exception(bool auto_continue) {
+ auto_continue_on_exception_ = auto_continue;
+ }
+
+ bool auto_continue_on_exception() { return auto_continue_on_exception_; }
+
// Executes function with the given name in the utility context. Passes node
// and json args as parameters. Note that the function called must be
// implemented in the inject_dispatch.js file.
@@ -76,6 +82,7 @@ class DebuggerAgentImpl : public DebuggerAgent {
DebuggerAgentDelegate* delegate_;
WebDevToolsAgentImpl* webdevtools_agent_;
int profiler_log_position_;
+ bool auto_continue_on_exception_;
};
#endif // WEBKIT_GLUE_DEVTOOLS_DEBUGGER_AGENT_IMPL_H_
diff --git a/webkit/glue/devtools/debugger_agent_manager.cc b/webkit/glue/devtools/debugger_agent_manager.cc
index 3c84743..1adb171 100644
--- a/webkit/glue/devtools/debugger_agent_manager.cc
+++ b/webkit/glue/devtools/debugger_agent_manager.cc
@@ -228,6 +228,12 @@ void DebuggerAgentManager::OnV8DebugMessage(const v8::Debug::Message& message) {
if (host_id != -1) {
DebuggerAgentImpl* agent = DebuggerAgentForHostId(host_id);
if (agent) {
+ if (agent->auto_continue_on_exception()
+ && message.GetEvent() == v8::Exception) {
+ SendContinueCommandToV8();
+ return;
+ }
+
agent->DebuggerOutput(out);
return;
}
diff --git a/webkit/glue/webdevtoolsagent_impl.cc b/webkit/glue/webdevtoolsagent_impl.cc
index da6055c..df1fa7b 100644
--- a/webkit/glue/webdevtoolsagent_impl.cc
+++ b/webkit/glue/webdevtoolsagent_impl.cc
@@ -401,6 +401,7 @@ void WebDevToolsAgentImpl::setApuAgentEnabled(bool enabled) {
// user could turn off resource tracking while apu agent is on.
ic->enableResourceTracking(false, false);
}
+ debugger_agent_impl_->set_auto_continue_on_exception(true);
} else {
ic->stopTimelineProfiler();
if (!resource_tracking_was_enabled_) {