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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp

Issue 1618003003: DevTools: clean up V8Debugger.h API, remove parts accessed only from within inspector/v8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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
Index: third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
diff --git a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
index 04fc9ff23ae1f4734cef6bc2c38acc30bf3efaf9..9a96d80c9eccf12216464422134e1b6e580d6d29 100644
--- a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
@@ -222,7 +222,7 @@ void V8DebuggerAgentImpl::disable(ErrorString*)
return;
m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, JSONObject::create());
- m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, V8Debugger::DontPauseOnExceptions);
+ m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, V8DebuggerImpl::DontPauseOnExceptions);
m_state->setString(DebuggerAgentState::skipStackPattern, "");
m_state->setBoolean(DebuggerAgentState::skipContentScripts, false);
m_state->setLong(DebuggerAgentState::asyncCallStackDepth, 0);
@@ -299,7 +299,7 @@ void V8DebuggerAgentImpl::restore()
ASSERT(!m_enabled);
m_frontend->globalObjectCleared();
enable();
- long pauseState = m_state->getLong(DebuggerAgentState::pauseOnExceptionsState, V8Debugger::DontPauseOnExceptions);
+ long pauseState = m_state->getLong(DebuggerAgentState::pauseOnExceptionsState, V8DebuggerImpl::DontPauseOnExceptions);
String error;
setPauseOnExceptionsImpl(&error, pauseState);
m_cachedSkipStackRegExp = compileSkipCallFramePattern(m_state->getString(DebuggerAgentState::skipStackPattern));
@@ -889,13 +889,13 @@ void V8DebuggerAgentImpl::setPauseOnExceptions(ErrorString* errorString, const S
{
if (!checkEnabled(errorString))
return;
- V8Debugger::PauseOnExceptionsState pauseState;
+ V8DebuggerImpl::PauseOnExceptionsState pauseState;
if (stringPauseState == "none") {
- pauseState = V8Debugger::DontPauseOnExceptions;
+ pauseState = V8DebuggerImpl::DontPauseOnExceptions;
} else if (stringPauseState == "all") {
- pauseState = V8Debugger::PauseOnAllExceptions;
+ pauseState = V8DebuggerImpl::PauseOnAllExceptions;
} else if (stringPauseState == "uncaught") {
- pauseState = V8Debugger::PauseOnUncaughtExceptions;
+ pauseState = V8DebuggerImpl::PauseOnUncaughtExceptions;
} else {
*errorString = "Unknown pause on exceptions mode: " + stringPauseState;
return;
@@ -905,7 +905,7 @@ void V8DebuggerAgentImpl::setPauseOnExceptions(ErrorString* errorString, const S
void V8DebuggerAgentImpl::setPauseOnExceptionsImpl(ErrorString* errorString, int pauseState)
{
- debugger().setPauseOnExceptionsState(static_cast<V8Debugger::PauseOnExceptionsState>(pauseState));
+ debugger().setPauseOnExceptionsState(static_cast<V8DebuggerImpl::PauseOnExceptionsState>(pauseState));
if (debugger().pauseOnExceptionsState() != pauseState)
*errorString = "Internal error. Could not change pause on exceptions state";
else
@@ -1652,6 +1652,13 @@ void V8DebuggerAgentImpl::breakProgram(InspectorFrontend::Debugger::Reason::Enum
debugger().breakProgram();
}
+void V8DebuggerAgentImpl::breakProgramOnException(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<JSONObject> data)
+{
+ if (m_debugger->pauseOnExceptionsState() == V8DebuggerImpl::DontPauseOnExceptions)
+ return;
+ breakProgram(breakReason, data);
+}
+
void V8DebuggerAgentImpl::clearStepIntoAsync()
{
m_startingStepIntoAsync = false;

Powered by Google App Engine
This is Rietveld 408576698