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

Unified Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 1224553008: [DevTools] Move Script and enums from ScriptDebugListener to V8Debugger. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index 377aba0e844e91c41263ac932548272a30024625..14cffef164a9071741f9f8c85f3960bdf1cee14d 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -526,37 +526,37 @@ bool InspectorDebuggerAgent::isCallFrameWithUnknownScriptOrBlackboxed(PassRefPtr
return isBlackboxed;
}
-ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipExceptionPause()
+V8Debugger::SkipPauseRequest InspectorDebuggerAgent::shouldSkipExceptionPause()
{
if (m_steppingFromFramework)
- return ScriptDebugListener::NoSkip;
+ return V8Debugger::NoSkip;
if (isTopCallFrameBlackboxed())
- return ScriptDebugListener::Continue;
- return ScriptDebugListener::NoSkip;
+ return V8Debugger::Continue;
+ return V8Debugger::NoSkip;
}
-ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipStepPause()
+V8Debugger::SkipPauseRequest InspectorDebuggerAgent::shouldSkipStepPause()
{
if (m_steppingFromFramework)
- return ScriptDebugListener::NoSkip;
+ return V8Debugger::NoSkip;
if (m_skipNextDebuggerStepOut) {
m_skipNextDebuggerStepOut = false;
if (m_scheduledDebuggerStep == StepOut)
- return ScriptDebugListener::StepOut;
+ return V8Debugger::StepOut;
}
if (!isTopCallFrameBlackboxed())
- return ScriptDebugListener::NoSkip;
+ return V8Debugger::NoSkip;
if (m_skippedStepFrameCount >= maxSkipStepFrameCount)
- return ScriptDebugListener::StepOut;
+ return V8Debugger::StepOut;
if (!m_skippedStepFrameCount)
m_recursionLevelForStepFrame = 1;
++m_skippedStepFrameCount;
- return ScriptDebugListener::StepFrame;
+ return V8Debugger::StepFrame;
}
PassRefPtr<TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint& breakpoint, BreakpointSource source)
@@ -569,7 +569,7 @@ PassRefPtr<TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreak
ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId);
if (scriptIterator == m_scripts.end())
return nullptr;
- Script& script = scriptIterator->value;
+ V8Debugger::Script& script = scriptIterator->value;
if (breakpoint.lineNumber < script.startLine() || script.endLine() < breakpoint.lineNumber)
return nullptr;
@@ -1464,9 +1464,9 @@ PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> InspectorDebuggerAgent::currentAsyn
return result.release();
}
-String InspectorDebuggerAgent::sourceMapURLForScript(const Script& script, CompileResult compileResult)
+String InspectorDebuggerAgent::sourceMapURLForScript(const V8Debugger::Script& script, V8Debugger::CompileResult compileResult)
{
- bool hasSyntaxError = compileResult != CompileSuccess;
+ bool hasSyntaxError = compileResult != V8Debugger::CompileSuccess;
if (!hasSyntaxError)
return script.sourceMappingURL();
return ContentSearchUtils::findSourceMapURL(script.source(), ContentSearchUtils::JavaScriptMagicComment);
@@ -1474,11 +1474,11 @@ String InspectorDebuggerAgent::sourceMapURLForScript(const Script& script, Compi
// ScriptDebugListener functions
-void InspectorDebuggerAgent::didParseSource(const ParsedScript& parsedScript)
+void InspectorDebuggerAgent::didParseSource(const V8Debugger::ParsedScript& parsedScript)
{
- Script script = parsedScript.script;
+ V8Debugger::Script script = parsedScript.script;
- bool hasSyntaxError = parsedScript.compileResult != CompileSuccess;
+ bool hasSyntaxError = parsedScript.compileResult != V8Debugger::CompileSuccess;
if (hasSyntaxError)
script.setSourceURL(ContentSearchUtils::findSourceURL(script.source(), ContentSearchUtils::JavaScriptMagicComment));
@@ -1521,27 +1521,27 @@ void InspectorDebuggerAgent::didParseSource(const ParsedScript& parsedScript)
}
}
-ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::didPause(ScriptState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints, bool isPromiseRejection)
+V8Debugger::SkipPauseRequest InspectorDebuggerAgent::didPause(ScriptState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints, bool isPromiseRejection)
{
- ScriptDebugListener::SkipPauseRequest result;
+ V8Debugger::SkipPauseRequest result;
if (m_skipAllPauses)
- result = ScriptDebugListener::Continue;
+ result = V8Debugger::Continue;
else if (!hitBreakpoints.isEmpty())
- result = ScriptDebugListener::NoSkip; // Don't skip explicit breakpoints even if set in frameworks.
+ result = V8Debugger::NoSkip; // Don't skip explicit breakpoints even if set in frameworks.
else if (!exception.isEmpty())
result = shouldSkipExceptionPause();
else if (m_scheduledDebuggerStep != NoStep || m_javaScriptPauseScheduled || m_pausingOnNativeEvent)
result = shouldSkipStepPause();
else
- result = ScriptDebugListener::NoSkip;
+ result = V8Debugger::NoSkip;
m_skipNextDebuggerStepOut = false;
- if (result != ScriptDebugListener::NoSkip)
+ if (result != V8Debugger::NoSkip)
return result;
// Skip pauses inside V8 internal scripts and on syntax errors.
if (callFrames.isEmpty())
- return ScriptDebugListener::Continue;
+ return V8Debugger::Continue;
ASSERT(scriptState);
ASSERT(!m_pausedScriptState);

Powered by Google App Engine
This is Rietveld 408576698