Chromium Code Reviews| 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"; |