Index: Source/bindings/core/dart/DartInspectorDebuggerAgent.cpp |
diff --git a/Source/bindings/core/dart/DartInspectorDebuggerAgent.cpp b/Source/bindings/core/dart/DartInspectorDebuggerAgent.cpp |
index 068625b7b55982d605e0d3db979ec93c65462689..acbeb9f76db78748e3a0d1924eae7fc203011214 100644 |
--- a/Source/bindings/core/dart/DartInspectorDebuggerAgent.cpp |
+++ b/Source/bindings/core/dart/DartInspectorDebuggerAgent.cpp |
@@ -107,7 +107,6 @@ static String generateBreakpointIdDart(const String& scriptId, int lineNumber, i |
DartInspectorDebuggerAgent::DartInspectorDebuggerAgent(DartInjectedScriptManager* injectedScriptManager, InspectorDebuggerAgent* inspectorDebuggerAgent, InspectorPageAgent* pageAgent) |
: m_injectedScriptManager(injectedScriptManager) |
- , m_frontend(0) |
, m_pausedScriptState(nullptr) |
, m_currentCallStack(0) |
, m_javaScriptPauseScheduled(false) |
@@ -178,7 +177,7 @@ void DartInspectorDebuggerAgent::enable(ErrorString*) |
enable(); |
state()->setBoolean(DartDebuggerAgentState::debuggerEnabled, true); |
- ASSERT(m_frontend); |
+ ASSERT(frontend()); |
} |
void DartInspectorDebuggerAgent::disable(ErrorString*) |
@@ -203,7 +202,7 @@ static PassOwnPtr<ScriptRegexp> compileSkipCallFramePattern(String patternText) |
void DartInspectorDebuggerAgent::restore() |
{ |
if (enabled()) { |
- m_frontend->globalObjectCleared(); |
+ frontend()->globalObjectCleared(); |
enable(); |
long pauseState = state()->getLong(DartDebuggerAgentState::pauseOnExceptionsState); |
String error; |
@@ -217,15 +216,14 @@ void DartInspectorDebuggerAgent::restore() |
} |
} |
-void DartInspectorDebuggerAgent::setFrontend(InspectorFrontend* frontend) |
+InspectorFrontend::Debugger* DartInspectorDebuggerAgent::frontend() |
{ |
- m_frontend = InspectorFrontend::Debugger::from(frontend); |
+ return m_inspectorDebuggerAgent->frontend(); |
} |
+ |
void DartInspectorDebuggerAgent::clearFrontend() |
{ |
- m_frontend = 0; |
- |
if (!enabled()) |
return; |
@@ -872,10 +870,11 @@ void DartInspectorDebuggerAgent::didParseSource(const String& scriptId, const Sc |
String* sourceMapURLParam = sourceMapURL.isNull() ? 0 : &sourceMapURL; |
bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : 0; |
+ ASSERT(frontend()); |
if (!hasSyntaxError) |
- m_frontend->scriptParsed(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, isInternalScript, sourceMapURLParam, hasSourceURLParam, languageParam, libraryIdParam); |
+ frontend()->scriptParsed(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, isInternalScript, sourceMapURLParam, hasSourceURLParam, languageParam, libraryIdParam); |
else |
- m_frontend->scriptFailedToParse(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, isInternalScript, sourceMapURLParam, hasSourceURLParam, languageParam, libraryIdParam); |
+ frontend()->scriptFailedToParse(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, isInternalScript, sourceMapURLParam, hasSourceURLParam, languageParam, libraryIdParam); |
m_scripts.set(scriptId, script); |
@@ -901,7 +900,7 @@ void DartInspectorDebuggerAgent::didParseSource(const String& scriptId, const Sc |
breakpointObject->getString(DartDebuggerAgentState::condition, &breakpoint.condition); |
RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint(it->key, scriptId, breakpoint, UserBreakpointSource); |
if (location) |
- m_frontend->breakpointResolved(it->key, location); |
+ frontend()->breakpointResolved(it->key, location); |
} |
} |
@@ -953,7 +952,7 @@ DartScriptDebugListener::SkipPauseRequest DartInspectorDebuggerAgent::didPause(D |
} |
} |
- m_frontend->paused(currentCallFrames(), m_breakReason, m_breakAuxData, hitBreakpointIds, nullptr); |
+ frontend()->paused(currentCallFrames(), m_breakReason, m_breakAuxData, hitBreakpointIds, nullptr); |
m_javaScriptPauseScheduled = false; |
m_debuggerStepScheduled = false; |
m_steppingFromFramework = false; |
@@ -975,7 +974,7 @@ void DartInspectorDebuggerAgent::didContinue() |
m_currentCallStack = 0; |
clearBreakDetails(); |
// Already called by InspectorDebuggerAgent? |
- m_frontend->resumed(); |
+ frontend()->resumed(); |
} |
bool DartInspectorDebuggerAgent::canBreakProgram() |