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

Unified Diff: Source/bindings/core/dart/DartInspectorDebuggerAgent.cpp

Issue 1672443003: Fix devtools bugs Fix a spurious layout test failure (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 years, 10 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/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()
« no previous file with comments | « Source/bindings/core/dart/DartInspectorDebuggerAgent.h ('k') | Source/bindings/core/dart/DartInspectorRuntimeAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698