Commit c7eea1e6 authored by sergeyv@chromium.org's avatar sergeyv@chromium.org

Devtools: Save custom formatter's state in the runtimeAgent

BUG=

Review URL: https://codereview.chromium.org/1311353007

git-svn-id: svn://svn.chromium.org/blink/trunk@201507 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8991deb5
...@@ -45,6 +45,7 @@ namespace blink { ...@@ -45,6 +45,7 @@ namespace blink {
namespace InspectorRuntimeAgentState { namespace InspectorRuntimeAgentState {
static const char runtimeEnabled[] = "runtimeEnabled"; static const char runtimeEnabled[] = "runtimeEnabled";
static const char customObjectFormatterEnabled[] = "customObjectFormatterEnabled";
}; };
class InspectorRuntimeAgent::InjectedScriptCallScope { class InspectorRuntimeAgent::InjectedScriptCallScope {
...@@ -196,6 +197,7 @@ void InspectorRuntimeAgent::isRunRequired(ErrorString*, bool* out_result) ...@@ -196,6 +197,7 @@ void InspectorRuntimeAgent::isRunRequired(ErrorString*, bool* out_result)
void InspectorRuntimeAgent::setCustomObjectFormatterEnabled(ErrorString*, bool enabled) void InspectorRuntimeAgent::setCustomObjectFormatterEnabled(ErrorString*, bool enabled)
{ {
m_state->setBoolean(InspectorRuntimeAgentState::customObjectFormatterEnabled, enabled);
injectedScriptManager()->setCustomObjectFormatterEnabled(enabled); injectedScriptManager()->setCustomObjectFormatterEnabled(enabled);
} }
...@@ -205,6 +207,8 @@ void InspectorRuntimeAgent::restore() ...@@ -205,6 +207,8 @@ void InspectorRuntimeAgent::restore()
frontend()->executionContextsCleared(); frontend()->executionContextsCleared();
String error; String error;
enable(&error); enable(&error);
if (m_state->getBoolean(InspectorRuntimeAgentState::customObjectFormatterEnabled))
injectedScriptManager()->setCustomObjectFormatterEnabled(true);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment