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

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

Issue 354023002: DevTools: disable DOMAgent when profiler is active (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed Created 6 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/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 8541804f0f6467bcea4ba1efcdfc9ebb8935fb92..88bda36714f4c6ea5f1b0479acc6c075dfa1006a 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -488,6 +488,12 @@ Element* InspectorDOMAgent::assertEditableElement(ErrorString* errorString, int
void InspectorDOMAgent::enable(ErrorString*)
{
+ enable();
+ restore();
pfeldman 2014/06/26 15:15:15 restore should call innerEnable instead, enable(Er
loislo 2014/06/26 18:27:05 In that case enable call wouldn't send the documen
+}
+
+void InspectorDOMAgent::enable()
+{
if (enabled())
return;
m_state->setBoolean(DOMAgentState::domAgentEnabled, true);
@@ -513,7 +519,7 @@ void InspectorDOMAgent::disable(ErrorString*)
void InspectorDOMAgent::getDocument(ErrorString* errorString, RefPtr<TypeBuilder::DOM::Node>& root)
{
// Backward compatibility. Mark agent as enabled when it requests document.
- enable(errorString);
+ enable();
if (!m_document) {
*errorString = "Document is not available";

Powered by Google App Engine
This is Rietveld 408576698