LayerTreeAgent should only be enabled upon restore if it was previously in the enable...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 09:08:30 +0000 (09:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 09:08:30 +0000 (09:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104887

Patch by Antoine Quint <graouts@apple.com> on 2012-12-14
Reviewed by Pavel Feldman.

Check that we were previously in the enabled state before re-enabling the agent upon restore,
as suggested by Pavel Feldman in follow-up discussion to https://bugs.webkit.org/show_bug.cgi?id=103513.

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::restore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137730 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorLayerTreeAgent.cpp

index b6d4e49..016f3ca 100644 (file)
@@ -1,3 +1,16 @@
+2012-12-14  Antoine Quint  <graouts@apple.com>
+
+        LayerTreeAgent should only be enabled upon restore if it was previously in the enabled state
+        https://bugs.webkit.org/show_bug.cgi?id=104887
+
+        Reviewed by Pavel Feldman.
+
+        Check that we were previously in the enabled state before re-enabling the agent upon restore,
+        as suggested by Pavel Feldman in follow-up discussion to https://bugs.webkit.org/show_bug.cgi?id=103513.
+
+        * inspector/InspectorLayerTreeAgent.cpp:
+        (WebCore::InspectorLayerTreeAgent::restore):
+
 2012-12-14  Eugene Klyuchnikov  <eustas@chromium.org>
 
         Web Inspector: CPU Profile: Search in "heavy" mode is very slow.
index ecb5e92..6446536 100644 (file)
@@ -78,7 +78,8 @@ void InspectorLayerTreeAgent::clearFrontend()
 
 void InspectorLayerTreeAgent::restore()
 {
-    enable(0);
+    if (m_state->getBoolean(LayerTreeAgentState::layerTreeAgentEnabled))
+        enable(0);
 }
 
 void InspectorLayerTreeAgent::reset()