| 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 cea098541fce7d89a6260773265504ade67de67e..9c4aeec405dd45a5436454794b6b5e8f805dd245 100644
|
| --- a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
|
| @@ -181,7 +181,7 @@ void V8DebuggerAgentImpl::enable()
|
| // debugger().addListener may result in reporting all parsed scripts to
|
| // the agent so it should already be in enabled state by then.
|
| m_enabled = true;
|
| - debugger().addListener(m_contextGroupId, this);
|
| + debugger().addAgent(m_contextGroupId, this);
|
| // FIXME(WK44513): breakpoints activated flag should be synchronized between all front-ends
|
| debugger().setBreakpointsActivated(true);
|
| }
|
| @@ -214,7 +214,7 @@ void V8DebuggerAgentImpl::disable(ErrorString*)
|
| m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, false);
|
| m_state->setBoolean(DebuggerAgentState::promiseTrackerCaptureStacks, false);
|
|
|
| - debugger().removeListener(m_contextGroupId);
|
| + debugger().removeAgent(m_contextGroupId);
|
| m_pausedScriptState = nullptr;
|
| m_currentCallStack.Reset();
|
| m_scripts.clear();
|
| @@ -528,37 +528,37 @@ bool V8DebuggerAgentImpl::isCallFrameWithUnknownScriptOrBlackboxed(PassRefPtr<Ja
|
| return isBlackboxed;
|
| }
|
|
|
| -V8DebuggerListener::SkipPauseRequest V8DebuggerAgentImpl::shouldSkipExceptionPause()
|
| +V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::shouldSkipExceptionPause()
|
| {
|
| if (m_steppingFromFramework)
|
| - return V8DebuggerListener::NoSkip;
|
| + return RequestNoSkip;
|
| if (isTopCallFrameBlackboxed())
|
| - return V8DebuggerListener::Continue;
|
| - return V8DebuggerListener::NoSkip;
|
| + return RequestContinue;
|
| + return RequestNoSkip;
|
| }
|
|
|
| -V8DebuggerListener::SkipPauseRequest V8DebuggerAgentImpl::shouldSkipStepPause()
|
| +V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::shouldSkipStepPause()
|
| {
|
| if (m_steppingFromFramework)
|
| - return V8DebuggerListener::NoSkip;
|
| + return RequestNoSkip;
|
|
|
| if (m_skipNextDebuggerStepOut) {
|
| m_skipNextDebuggerStepOut = false;
|
| if (m_scheduledDebuggerStep == StepOut)
|
| - return V8DebuggerListener::StepOut;
|
| + return RequestStepOut;
|
| }
|
|
|
| if (!isTopCallFrameBlackboxed())
|
| - return V8DebuggerListener::NoSkip;
|
| + return RequestNoSkip;
|
|
|
| if (m_skippedStepFrameCount >= maxSkipStepFrameCount)
|
| - return V8DebuggerListener::StepOut;
|
| + return RequestStepOut;
|
|
|
| if (!m_skippedStepFrameCount)
|
| m_recursionLevelForStepFrame = 1;
|
|
|
| ++m_skippedStepFrameCount;
|
| - return V8DebuggerListener::StepFrame;
|
| + return RequestStepFrame;
|
| }
|
|
|
| PassRefPtr<TypeBuilder::Debugger::Location> V8DebuggerAgentImpl::resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint& breakpoint, BreakpointSource source)
|
| @@ -570,7 +570,7 @@ PassRefPtr<TypeBuilder::Debugger::Location> V8DebuggerAgentImpl::resolveBreakpoi
|
| ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId);
|
| if (scriptIterator == m_scripts.end())
|
| return nullptr;
|
| - Script& script = scriptIterator->value;
|
| + V8DebuggerScript& script = scriptIterator->value;
|
| if (breakpoint.lineNumber < script.startLine() || script.endLine() < breakpoint.lineNumber)
|
| return nullptr;
|
|
|
| @@ -1441,21 +1441,19 @@ PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> V8DebuggerAgentImpl::currentAsyncSt
|
| return result.release();
|
| }
|
|
|
| -String V8DebuggerAgentImpl::sourceMapURLForScript(const Script& script, CompileResult compileResult)
|
| +String V8DebuggerAgentImpl::sourceMapURLForScript(const V8DebuggerScript& script, V8DebuggerParsedScript::CompileResult compileResult)
|
| {
|
| - bool hasSyntaxError = compileResult != CompileSuccess;
|
| + bool hasSyntaxError = compileResult != V8DebuggerParsedScript::CompileSuccess;
|
| if (!hasSyntaxError)
|
| return script.sourceMappingURL();
|
| return ContentSearchUtils::findSourceMapURL(script.source(), ContentSearchUtils::JavaScriptMagicComment);
|
| }
|
|
|
| -// V8DebuggerListener functions
|
| -
|
| -void V8DebuggerAgentImpl::didParseSource(const ParsedScript& parsedScript)
|
| +void V8DebuggerAgentImpl::didParseSource(const V8DebuggerParsedScript& parsedScript)
|
| {
|
| - Script script = parsedScript.script;
|
| + V8DebuggerScript script = parsedScript.script;
|
|
|
| - bool hasSyntaxError = parsedScript.compileResult != CompileSuccess;
|
| + bool hasSyntaxError = parsedScript.compileResult != V8DebuggerParsedScript::CompileSuccess;
|
| if (hasSyntaxError)
|
| script.setSourceURL(ContentSearchUtils::findSourceURL(script.source(), ContentSearchUtils::JavaScriptMagicComment));
|
|
|
| @@ -1500,33 +1498,33 @@ void V8DebuggerAgentImpl::didParseSource(const ParsedScript& parsedScript)
|
| }
|
| }
|
|
|
| -V8DebuggerListener::SkipPauseRequest V8DebuggerAgentImpl::didPause(v8::Local<v8::Context> context, v8::Local<v8::Object> callFrames, v8::Local<v8::Value> v8exception, const Vector<String>& hitBreakpoints, bool isPromiseRejection)
|
| +V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::didPause(v8::Local<v8::Context> context, v8::Local<v8::Object> callFrames, v8::Local<v8::Value> v8exception, const Vector<String>& hitBreakpoints, bool isPromiseRejection)
|
| {
|
| ScriptState* scriptState = ScriptState::from(context);
|
| if (!scriptState->contextIsValid())
|
| - return V8DebuggerListener::Continue;
|
| + return RequestContinue;
|
|
|
| ScriptValue exception(scriptState, v8exception);
|
|
|
| - V8DebuggerListener::SkipPauseRequest result;
|
| + V8DebuggerAgentImpl::SkipPauseRequest result;
|
| if (m_skipAllPauses)
|
| - result = V8DebuggerListener::Continue;
|
| + result = RequestContinue;
|
| else if (!hitBreakpoints.isEmpty())
|
| - result = V8DebuggerListener::NoSkip; // Don't skip explicit breakpoints even if set in frameworks.
|
| + result = RequestNoSkip; // 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 = V8DebuggerListener::NoSkip;
|
| + result = RequestNoSkip;
|
|
|
| m_skipNextDebuggerStepOut = false;
|
| - if (result != V8DebuggerListener::NoSkip)
|
| + if (result != RequestNoSkip)
|
| return result;
|
|
|
| // Skip pauses inside V8 internal scripts and on syntax errors.
|
| if (callFrames.IsEmpty())
|
| - return V8DebuggerListener::Continue;
|
| + return RequestContinue;
|
|
|
| ASSERT(scriptState);
|
| ASSERT(!m_pausedScriptState);
|
|
|