Title: [164637] trunk/Source
Revision
164637
Author
[email protected]
Date
2014-02-25 00:19:25 -0800 (Tue, 25 Feb 2014)

Log Message

Prune dead code for Web Inspector memory instrumentation.
<https://webkit.org/b/129286>

Source/WebCore:

This was leftover code from Chromium's inspector. It's not used by
today's WebKit inspector.

Reviewed by Sam Weinig.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorController.h:
* inspector/InspectorMemoryAgent.cpp: Removed.
* inspector/InspectorMemoryAgent.h: Removed.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* inspector/protocol/Memory.json: Removed.

Source/WebInspectorUI:

Reviewed by Sam Weinig.

* UserInterface/Protocol/InspectorWebBackendCommands.js:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (164636 => 164637)


--- trunk/Source/WebCore/CMakeLists.txt	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/CMakeLists.txt	2014-02-25 08:19:25 UTC (rev 164637)
@@ -761,7 +761,6 @@
     inspector/protocol/IndexedDB.json
     inspector/protocol/Input.json
     inspector/protocol/LayerTree.json
-    inspector/protocol/Memory.json
     inspector/protocol/Network.json
     inspector/protocol/Page.json
     inspector/protocol/Profiler.json
@@ -1577,7 +1576,6 @@
     inspector/InspectorInstrumentation.cpp
     inspector/InspectorInstrumentationCookie.cpp
     inspector/InspectorLayerTreeAgent.cpp
-    inspector/InspectorMemoryAgent.cpp
     inspector/InspectorNodeFinder.cpp
     inspector/InspectorOverlay.cpp
     inspector/InspectorPageAgent.cpp

Modified: trunk/Source/WebCore/ChangeLog (164636 => 164637)


--- trunk/Source/WebCore/ChangeLog	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/ChangeLog	2014-02-25 08:19:25 UTC (rev 164637)
@@ -1,3 +1,33 @@
+2014-02-25  Andreas Kling  <[email protected]>
+
+        Prune dead code for Web Inspector memory instrumentation.
+        <https://webkit.org/b/129286>
+
+        This was leftover code from Chromium's inspector. It's not used by
+        today's WebKit inspector.
+
+        Reviewed by Sam Weinig.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * inspector/InspectorAllInOne.cpp:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::InspectorController):
+        * inspector/InspectorController.h:
+        * inspector/InspectorMemoryAgent.cpp: Removed.
+        * inspector/InspectorMemoryAgent.h: Removed.
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/WorkerInspectorController.cpp:
+        (WebCore::WorkerInspectorController::WorkerInspectorController):
+        * inspector/protocol/Memory.json: Removed.
+
 2014-02-24  Chris Fleizach  <[email protected]>
 
         AX: Support abbr, acronym

Modified: trunk/Source/WebCore/DerivedSources.make (164636 => 164637)


--- trunk/Source/WebCore/DerivedSources.make	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/DerivedSources.make	2014-02-25 08:19:25 UTC (rev 164637)
@@ -1106,7 +1106,6 @@
     $(WebCore)/inspector/protocol/IndexedDB.json \
     $(WebCore)/inspector/protocol/Input.json \
     $(WebCore)/inspector/protocol/LayerTree.json \
-    $(WebCore)/inspector/protocol/Memory.json \
     $(WebCore)/inspector/protocol/Network.json \
     $(WebCore)/inspector/protocol/Page.json \
     $(WebCore)/inspector/protocol/Profiler.json \

Modified: trunk/Source/WebCore/GNUmakefile.am (164636 => 164637)


--- trunk/Source/WebCore/GNUmakefile.am	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/GNUmakefile.am	2014-02-25 08:19:25 UTC (rev 164637)
@@ -350,7 +350,6 @@
     $(WebCore)/inspector/protocol/IndexedDB.json \
     $(WebCore)/inspector/protocol/Input.json \
     $(WebCore)/inspector/protocol/LayerTree.json \
-    $(WebCore)/inspector/protocol/Memory.json \
     $(WebCore)/inspector/protocol/Network.json \
     $(WebCore)/inspector/protocol/Page.json \
     $(WebCore)/inspector/protocol/Profiler.json \

Modified: trunk/Source/WebCore/GNUmakefile.list.am (164636 => 164637)


--- trunk/Source/WebCore/GNUmakefile.list.am	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2014-02-25 08:19:25 UTC (rev 164637)
@@ -3797,8 +3797,6 @@
 	Source/WebCore/inspector/InspectorInstrumentationCookie.h \
 	Source/WebCore/inspector/InspectorLayerTreeAgent.cpp \
 	Source/WebCore/inspector/InspectorLayerTreeAgent.h \
-	Source/WebCore/inspector/InspectorMemoryAgent.cpp \
-	Source/WebCore/inspector/InspectorMemoryAgent.h \
 	Source/WebCore/inspector/InspectorNodeFinder.cpp \
 	Source/WebCore/inspector/InspectorNodeFinder.h \
 	Source/WebCore/inspector/InspectorOverlay.cpp \

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (164636 => 164637)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-02-25 08:19:25 UTC (rev 164637)
@@ -17628,14 +17628,6 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="..\inspector\InspectorMemoryAgent.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
-    </ClCompile>
     <ClCompile Include="..\inspector\InspectorNodeFinder.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -20769,7 +20761,6 @@
     <ClInclude Include="..\inspector\InspectorInstrumentation.h" />
     <ClInclude Include="..\inspector\InspectorInstrumentationCookie.h" />
     <ClInclude Include="..\inspector\InspectorLayerTreeAgent.h" />
-    <ClInclude Include="..\inspector\InspectorMemoryAgent.h" />
     <ClInclude Include="..\inspector\InspectorNodeFinder.h" />
     <ClInclude Include="..\inspector\InspectorOverlay.h" />
     <ClInclude Include="..\inspector\InspectorPageAgent.h" />

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (164636 => 164637)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-02-25 08:19:25 UTC (rev 164637)
@@ -4791,9 +4791,6 @@
     <ClCompile Include="..\inspector\InspectorLayerTreeAgent.cpp">
       <Filter>inspector</Filter>
     </ClCompile>
-    <ClCompile Include="..\inspector\InspectorMemoryAgent.cpp">
-      <Filter>inspector</Filter>
-    </ClCompile>
     <ClCompile Include="..\inspector\InspectorOverlay.cpp">
       <Filter>inspector</Filter>
     </ClCompile>
@@ -12335,9 +12332,6 @@
     <ClInclude Include="..\inspector\InspectorLayerTreeAgent.h">
       <Filter>inspector</Filter>
     </ClInclude>
-    <ClInclude Include="..\inspector\InspectorMemoryAgent.h">
-      <Filter>inspector</Filter>
-    </ClInclude>
     <ClInclude Include="..\inspector\InspectorNodeFinder.h">
       <Filter>inspector</Filter>
     </ClInclude>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (164636 => 164637)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-02-25 08:19:25 UTC (rev 164637)
@@ -2281,8 +2281,6 @@
 		7A74ECBA101839A600BF939E /* InspectorDOMStorageAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */; };
 		7A74ECBB101839A600BF939E /* InspectorDOMStorageAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A74ECB9101839A600BF939E /* InspectorDOMStorageAgent.h */; };
 		7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */; };
-		7AA51DD5148506A900AD2752 /* InspectorMemoryAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AA51DD3148506A900AD2752 /* InspectorMemoryAgent.cpp */; };
-		7AA51DD6148506A900AD2752 /* InspectorMemoryAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AA51DD4148506A900AD2752 /* InspectorMemoryAgent.h */; };
 		7AABA25914BC613300AA9A11 /* DOMEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AABA25714BC613300AA9A11 /* DOMEditor.cpp */; };
 		7AABA25A14BC613300AA9A11 /* DOMEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AABA25814BC613300AA9A11 /* DOMEditor.h */; };
 		7AB0B1C01211A62200A76940 /* InspectorDatabaseAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */; };
@@ -9229,8 +9227,6 @@
 		7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDOMStorageAgent.cpp; sourceTree = "<group>"; };
 		7A74ECB9101839A600BF939E /* InspectorDOMStorageAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDOMStorageAgent.h; sourceTree = "<group>"; };
 		7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorFrontendHostCustom.cpp; sourceTree = "<group>"; };
-		7AA51DD3148506A900AD2752 /* InspectorMemoryAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorMemoryAgent.cpp; sourceTree = "<group>"; };
-		7AA51DD4148506A900AD2752 /* InspectorMemoryAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorMemoryAgent.h; sourceTree = "<group>"; };
 		7AABA25714BC613300AA9A11 /* DOMEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMEditor.cpp; sourceTree = "<group>"; };
 		7AABA25814BC613300AA9A11 /* DOMEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMEditor.h; sourceTree = "<group>"; };
 		7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDatabaseAgent.cpp; sourceTree = "<group>"; };
@@ -14839,8 +14835,6 @@
 				A5840E1B187B74D500843B10 /* InspectorInstrumentationCookie.h */,
 				71B1E123164048CC00B1880A /* InspectorLayerTreeAgent.cpp */,
 				71B1E124164048CC00B1880A /* InspectorLayerTreeAgent.h */,
-				7AA51DD3148506A900AD2752 /* InspectorMemoryAgent.cpp */,
-				7AA51DD4148506A900AD2752 /* InspectorMemoryAgent.h */,
 				504AACCB1834455900E3D9BC /* InspectorNodeFinder.cpp */,
 				504AACCC1834455900E3D9BC /* InspectorNodeFinder.h */,
 				7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */,
@@ -23938,7 +23932,6 @@
 				20D629271253690B00081543 /* InspectorInstrumentation.h in Headers */,
 				A5840E1D187B74D500843B10 /* InspectorInstrumentationCookie.h in Headers */,
 				71B1E125164048F700B1880A /* InspectorLayerTreeAgent.h in Headers */,
-				7AA51DD6148506A900AD2752 /* InspectorMemoryAgent.h in Headers */,
 				504AACCE1834455900E3D9BC /* InspectorNodeFinder.h in Headers */,
 				0F03C0751884805500A5F8CA /* InspectorOverlay.h in Headers */,
 				4F6FDD651341DEDD001F8EE3 /* InspectorPageAgent.h in Headers */,
@@ -27295,7 +27288,6 @@
 				20D629261253690B00081543 /* InspectorInstrumentation.cpp in Sources */,
 				A5840E1C187B74D500843B10 /* InspectorInstrumentationCookie.cpp in Sources */,
 				71B1E1261640491A00B1880A /* InspectorLayerTreeAgent.cpp in Sources */,
-				7AA51DD5148506A900AD2752 /* InspectorMemoryAgent.cpp in Sources */,
 				504AACCD1834455900E3D9BC /* InspectorNodeFinder.cpp in Sources */,
 				7C522D4B15B477E8009B7C95 /* InspectorOverlay.cpp in Sources */,
 				4F6FDD641341DEDD001F8EE3 /* InspectorPageAgent.cpp in Sources */,

Modified: trunk/Source/WebCore/inspector/InspectorAllInOne.cpp (164636 => 164637)


--- trunk/Source/WebCore/inspector/InspectorAllInOne.cpp	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/InspectorAllInOne.cpp	2014-02-25 08:19:25 UTC (rev 164637)
@@ -48,7 +48,6 @@
 #include "InspectorInstrumentation.cpp"
 #include "InspectorInstrumentationCookie.cpp"
 #include "InspectorLayerTreeAgent.cpp"
-#include "InspectorMemoryAgent.cpp"
 #include "InspectorNodeFinder.cpp"
 #include "InspectorOverlay.cpp"
 #include "InspectorPageAgent.cpp"

Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (164636 => 164637)


--- trunk/Source/WebCore/inspector/InspectorController.cpp	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp	2014-02-25 08:19:25 UTC (rev 164637)
@@ -49,7 +49,6 @@
 #include "InspectorInputAgent.h"
 #include "InspectorInstrumentation.h"
 #include "InspectorLayerTreeAgent.h"
-#include "InspectorMemoryAgent.h"
 #include "InspectorOverlay.h"
 #include "InspectorPageAgent.h"
 #include "InspectorProfilerAgent.h"
@@ -129,11 +128,7 @@
     InspectorDOMStorageAgent* domStorageAgent = domStorageAgentPtr.get();
     m_agents.append(std::move(domStorageAgentPtr));
 
-    auto memoryAgentPtr = std::make_unique<InspectorMemoryAgent>(m_instrumentingAgents.get());
-    m_memoryAgent = memoryAgentPtr.get();
-    m_agents.append(std::move(memoryAgentPtr));
-
-    m_agents.append(std::make_unique<InspectorTimelineAgent>(m_instrumentingAgents.get(), pageAgent, m_memoryAgent, InspectorTimelineAgent::PageInspector, inspectorClient));
+    m_agents.append(std::make_unique<InspectorTimelineAgent>(m_instrumentingAgents.get(), pageAgent, InspectorTimelineAgent::PageInspector, inspectorClient));
     m_agents.append(std::make_unique<InspectorApplicationCacheAgent>(m_instrumentingAgents.get(), pageAgent));
 
     auto resourceAgentPtr = std::make_unique<InspectorResourceAgent>(m_instrumentingAgents.get(), pageAgent, inspectorClient);

Modified: trunk/Source/WebCore/inspector/InspectorController.h (164636 => 164637)


--- trunk/Source/WebCore/inspector/InspectorController.h	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/InspectorController.h	2014-02-25 08:19:25 UTC (rev 164637)
@@ -59,7 +59,6 @@
 class InspectorDOMAgent;
 class InspectorDOMDebuggerAgent;
 class InspectorFrontendClient;
-class InspectorMemoryAgent;
 class InspectorOverlay;
 class InspectorPageAgent;
 class InspectorProfilerAgent;
@@ -149,7 +148,6 @@
     InspectorDOMAgent* m_domAgent;
     InspectorResourceAgent* m_resourceAgent;
     InspectorPageAgent* m_pageAgent;
-    InspectorMemoryAgent* m_memoryAgent;
     Inspector::InspectorDebuggerAgent* m_debuggerAgent;
     InspectorDOMDebuggerAgent* m_domDebuggerAgent;
     InspectorProfilerAgent* m_profilerAgent;

Deleted: trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp (164636 => 164637)


--- trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2014-02-25 08:19:25 UTC (rev 164637)
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "InspectorMemoryAgent.h"
-
-#include "CharacterData.h"
-#include "Document.h"
-#include "EventListenerMap.h"
-#include "Frame.h"
-#include "InspectorDOMStorageAgent.h"
-#include "InspectorWebFrontendDispatchers.h"
-#include "InstrumentingAgents.h"
-#include "MemoryCache.h"
-#include "Node.h"
-#include "NodeTraversal.h"
-#include "ScriptProfiler.h"
-#include "StyledElement.h"
-#include <inspector/InspectorValues.h>
-#include <runtime/ArrayBufferView.h>
-#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/StringImpl.h>
-#include <wtf/text/WTFString.h>
-
-// Use a type alias instead of 'using' here which would cause a conflict on Mac.
-typedef Inspector::TypeBuilder::Memory::MemoryBlock InspectorMemoryBlock;
-typedef Inspector::TypeBuilder::Array<InspectorMemoryBlock> InspectorMemoryBlocks;
-
-using namespace Inspector;
-
-namespace WebCore {
-
-InspectorMemoryAgent::~InspectorMemoryAgent()
-{
-}
-
-void InspectorMemoryAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
-{
-    m_backendDispatcher = InspectorMemoryBackendDispatcher::create(backendDispatcher, this);
-}
-
-void InspectorMemoryAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason)
-{
-    m_backendDispatcher.clear();
-}
-
-void InspectorMemoryAgent::getDOMCounters(ErrorString*, int* documents, int* nodes, int* jsEventListeners)
-{
-    *documents = InspectorCounters::counterValue(InspectorCounters::DocumentCounter);
-    *nodes = InspectorCounters::counterValue(InspectorCounters::NodeCounter);
-    *jsEventListeners = ThreadLocalInspectorCounters::current().counterValue(ThreadLocalInspectorCounters::JSEventListenerCounter);
-}
-
-InspectorMemoryAgent::InspectorMemoryAgent(InstrumentingAgents* instrumentingAgents)
-    : InspectorAgentBase(ASCIILiteral("Memory"), instrumentingAgents)
-{
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)

Deleted: trunk/Source/WebCore/inspector/InspectorMemoryAgent.h (164636 => 164637)


--- trunk/Source/WebCore/inspector/InspectorMemoryAgent.h	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/InspectorMemoryAgent.h	2014-02-25 08:19:25 UTC (rev 164637)
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InspectorMemoryAgent_h
-#define InspectorMemoryAgent_h
-
-#if ENABLE(INSPECTOR)
-
-#include "InspectorWebAgentBase.h"
-#include "InspectorWebBackendDispatchers.h"
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class InspectorDOMStorageAgent;
-class InstrumentingAgents;
-
-typedef String ErrorString;
-
-class InspectorMemoryAgent : public InspectorAgentBase, public Inspector::InspectorMemoryBackendDispatcherHandler {
-    WTF_MAKE_NONCOPYABLE(InspectorMemoryAgent);
-public:
-    explicit InspectorMemoryAgent(InstrumentingAgents*);
-    virtual ~InspectorMemoryAgent();
-
-    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
-
-    virtual void getDOMCounters(ErrorString*, int* documents, int* nodes, int* jsEventListeners) override;
-
-private:
-    RefPtr<Inspector::InspectorMemoryBackendDispatcher> m_backendDispatcher;
-};
-
-} // namespace WebCore
-
-#endif // !ENABLE(INSPECTOR)
-#endif // !defined(InspectorMemoryAgent_h)

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (164636 => 164637)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2014-02-25 08:19:25 UTC (rev 164637)
@@ -40,7 +40,6 @@
 #include "InspectorClient.h"
 #include "InspectorCounters.h"
 #include "InspectorInstrumentation.h"
-#include "InspectorMemoryAgent.h"
 #include "InspectorPageAgent.h"
 #include "InspectorWebFrontendDispatchers.h"
 #include "InstrumentingAgents.h"
@@ -620,10 +619,9 @@
     }
 }
 
-InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorMemoryAgent* memoryAgent, InspectorType type, InspectorClient* client)
+InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorType type, InspectorClient* client)
     : InspectorAgentBase(ASCIILiteral("Timeline"), instrumentingAgents)
     , m_pageAgent(pageAgent)
-    , m_memoryAgent(memoryAgent)
     , m_id(1)
     , m_maxCallStackDepth(5)
     , m_inspectorType(type)

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (164636 => 164637)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h	2014-02-25 08:19:25 UTC (rev 164637)
@@ -47,7 +47,6 @@
 class FloatQuad;
 class Frame;
 class InspectorClient;
-class InspectorMemoryAgent;
 class InspectorPageAgent;
 class InstrumentingAgents;
 class IntRect;
@@ -127,7 +126,7 @@
 public:
     enum InspectorType { PageInspector, WorkerInspector };
 
-    InspectorTimelineAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorMemoryAgent*, InspectorType, InspectorClient*);
+    InspectorTimelineAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorType, InspectorClient*);
     ~InspectorTimelineAgent();
 
     virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
@@ -249,7 +248,6 @@
     Page* page();
 
     InspectorPageAgent* m_pageAgent;
-    InspectorMemoryAgent* m_memoryAgent;
     TimelineTimeConverter m_timeConverter;
 
     std::unique_ptr<Inspector::InspectorTimelineFrontendDispatcher> m_frontendDispatcher;

Modified: trunk/Source/WebCore/inspector/WorkerInspectorController.cpp (164636 => 164637)


--- trunk/Source/WebCore/inspector/WorkerInspectorController.cpp	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/WorkerInspectorController.cpp	2014-02-25 08:19:25 UTC (rev 164637)
@@ -98,7 +98,7 @@
 
     m_agents.append(InspectorProfilerAgent::create(m_instrumentingAgents.get(), consoleAgent.get(), &workerGlobalScope, m_injectedScriptManager.get()));
     m_agents.append(std::make_unique<InspectorHeapProfilerAgent>(m_instrumentingAgents.get(), m_injectedScriptManager.get()));
-    m_agents.append(std::make_unique<InspectorTimelineAgent>(m_instrumentingAgents.get(), nullptr, nullptr, InspectorTimelineAgent::WorkerInspector, nullptr));
+    m_agents.append(std::make_unique<InspectorTimelineAgent>(m_instrumentingAgents.get(), nullptr, InspectorTimelineAgent::WorkerInspector, nullptr));
     m_agents.append(std::move(consoleAgent));
 
     if (CommandLineAPIHost* commandLineAPIHost = m_injectedScriptManager->commandLineAPIHost()) {

Deleted: trunk/Source/WebCore/inspector/protocol/Memory.json (164636 => 164637)


--- trunk/Source/WebCore/inspector/protocol/Memory.json	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebCore/inspector/protocol/Memory.json	2014-02-25 08:19:25 UTC (rev 164637)
@@ -1,24 +0,0 @@
-{
-    "domain": "Memory",
-    "types": [
-        {
-            "id": "MemoryBlock",
-            "type": "object",
-            "properties": [
-                { "name": "size", "type": "number", "optional": true, "description": "Size of the block in bytes if available" },
-                { "name": "name", "type": "string", "description": "Unique name used to identify the component that allocated this block" },
-                { "name": "children", "type": "array", "optional": true, "items": { "$ref": "MemoryBlock" }}
-            ]
-        }
-    ],
-    "commands": [
-        {
-            "name": "getDOMCounters",
-            "returns": [
-                { "name": "documents", "type": "integer" },
-                { "name": "nodes", "type": "integer" },
-                { "name": "jsEventListeners", "type": "integer" }
-            ]
-        }
-    ]
-}

Modified: trunk/Source/WebInspectorUI/ChangeLog (164636 => 164637)


--- trunk/Source/WebInspectorUI/ChangeLog	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebInspectorUI/ChangeLog	2014-02-25 08:19:25 UTC (rev 164637)
@@ -1,3 +1,12 @@
+2014-02-25  Andreas Kling  <[email protected]>
+
+        Prune dead code for Web Inspector memory instrumentation.
+        <https://webkit.org/b/129286>
+
+        Reviewed by Sam Weinig.
+
+        * UserInterface/Protocol/InspectorWebBackendCommands.js:
+
 2014-02-24  Timothy Hatcher  <[email protected]>
 
         Switch from prefixed CSS gradient to unprefixed.

Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorWebBackendCommands.js (164636 => 164637)


--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorWebBackendCommands.js	2014-02-25 08:09:33 UTC (rev 164636)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorWebBackendCommands.js	2014-02-25 08:19:25 UTC (rev 164637)
@@ -183,10 +183,6 @@
 InspectorBackend.registerCommand("LayerTree.layersForNode", [{"name": "nodeId", "type": "number", "optional": false}], ["layers"]);
 InspectorBackend.registerCommand("LayerTree.reasonsForCompositingLayer", [{"name": "layerId", "type": "string", "optional": false}], ["compositingReasons"]);
 
-// Memory.
-InspectorBackend.registerMemoryDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Memory");
-InspectorBackend.registerCommand("Memory.getDOMCounters", [], ["documents", "nodes", "jsEventListeners"]);
-
 // Network.
 InspectorBackend.registerNetworkDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Network");
 InspectorBackend.registerEnum("Network.InitiatorType", {Parser: "parser", Script: "script", Other: "other"});
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to