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

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

Issue 16934003: Inspector: replace generic discardAgents logic with explicit call to discard a listener. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/InspectorCSSAgent.cpp
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index abd9e0bc195420327f3e142ffd68fc08797f2bbe..a0f170cd8d8e8fd563d5337fdf532c462605c74f 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -695,7 +695,8 @@ InspectorCSSAgent::InspectorCSSAgent(InstrumentingAgents* instrumentingAgents, I
InspectorCSSAgent::~InspectorCSSAgent()
{
- ASSERT(!m_domAgent);
+ if (m_domAgent)
+ m_domAgent->setDOMListener(0);
reset();
}
@@ -713,12 +714,6 @@ void InspectorCSSAgent::clearFrontend()
stopSelectorProfilerImpl(0, false);
}
-void InspectorCSSAgent::discardAgent()
-{
- m_domAgent->setDOMListener(0);
- m_domAgent = 0;
-}
-
void InspectorCSSAgent::restore()
{
if (m_state->getBoolean(CSSAgentState::cssAgentEnabled)) {
@@ -1552,6 +1547,11 @@ void InspectorCSSAgent::didModifyDOMAttr(Element* element)
it->value->didModifyElementAttribute();
}
+void InspectorCSSAgent::discardListener()
+{
+ m_domAgent = 0;
+}
+
void InspectorCSSAgent::styleSheetChanged(InspectorStyleSheet* styleSheet)
{
if (m_frontend)

Powered by Google App Engine
This is Rietveld 408576698