Prune dead code for Web Inspector memory instrumentation.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Feb 2014 08:19:25 +0000 (08:19 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Feb 2014 08:19:25 +0000 (08:19 +0000)
<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:

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

19 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.am
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/inspector/InspectorAllInOne.cpp
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorController.h
Source/WebCore/inspector/InspectorMemoryAgent.cpp [deleted file]
Source/WebCore/inspector/InspectorMemoryAgent.h [deleted file]
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/WorkerInspectorController.cpp
Source/WebCore/inspector/protocol/Memory.json [deleted file]
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Protocol/InspectorWebBackendCommands.js

index 62ae002..aafe35a 100644 (file)
@@ -761,7 +761,6 @@ set(WebCore_INSPECTOR_DOMAINS
     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 @@ set(WebCore_SOURCES
     inspector/InspectorInstrumentation.cpp
     inspector/InspectorInstrumentationCookie.cpp
     inspector/InspectorLayerTreeAgent.cpp
-    inspector/InspectorMemoryAgent.cpp
     inspector/InspectorNodeFinder.cpp
     inspector/InspectorOverlay.cpp
     inspector/InspectorPageAgent.cpp
index d262c72..98397cd 100644 (file)
@@ -1,3 +1,33 @@
+2014-02-25  Andreas Kling  <akling@apple.com>
+
+        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  <cfleizach@apple.com>
 
         AX: Support abbr, acronym
index c1aa4cc..555dd50 100644 (file)
@@ -1106,7 +1106,6 @@ INSPECTOR_DOMAINS = \
     $(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 \
index a00b997..28cca9b 100644 (file)
@@ -350,7 +350,6 @@ WebCore_INSPECTOR_DOMAINS := \
     $(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 \
index 4a403d2..44cb35b 100644 (file)
@@ -3797,8 +3797,6 @@ webcore_sources += \
        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 \
index 1862b70..dfb5052 100644 (file)
       <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>
     <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" />
index 8781e90..42f7978 100644 (file)
     <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>
     <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>
index 4f2eef1..67a25e5 100644 (file)
                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 */; };
                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>"; };
                                A5840E1B187B74D500843B10 /* InspectorInstrumentationCookie.h */,
                                71B1E123164048CC00B1880A /* InspectorLayerTreeAgent.cpp */,
                                71B1E124164048CC00B1880A /* InspectorLayerTreeAgent.h */,
-                               7AA51DD3148506A900AD2752 /* InspectorMemoryAgent.cpp */,
-                               7AA51DD4148506A900AD2752 /* InspectorMemoryAgent.h */,
                                504AACCB1834455900E3D9BC /* InspectorNodeFinder.cpp */,
                                504AACCC1834455900E3D9BC /* InspectorNodeFinder.h */,
                                7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */,
                                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 */,
                                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 */,
index 0e914d3..d4d1657 100644 (file)
@@ -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"
index a42ec15..18f2faf 100644 (file)
@@ -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 @@ InspectorController::InspectorController(Page& page, InspectorClient* inspectorC
     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);
index 4006b82..8722d67 100644 (file)
@@ -59,7 +59,6 @@ class InspectorClient;
 class InspectorDOMAgent;
 class InspectorDOMDebuggerAgent;
 class InspectorFrontendClient;
-class InspectorMemoryAgent;
 class InspectorOverlay;
 class InspectorPageAgent;
 class InspectorProfilerAgent;
@@ -149,7 +148,6 @@ private:
     InspectorDOMAgent* m_domAgent;
     InspectorResourceAgent* m_resourceAgent;
     InspectorPageAgent* m_pageAgent;
-    InspectorMemoryAgent* m_memoryAgent;
     Inspector::InspectorDebuggerAgent* m_debuggerAgent;
     InspectorDOMDebuggerAgent* m_domDebuggerAgent;
     InspectorProfilerAgent* m_profilerAgent;
diff --git a/Source/WebCore/inspector/InspectorMemoryAgent.cpp b/Source/WebCore/inspector/InspectorMemoryAgent.cpp
deleted file mode 100644 (file)
index 35ee01e..0000000
+++ /dev/null
@@ -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)
diff --git a/Source/WebCore/inspector/InspectorMemoryAgent.h b/Source/WebCore/inspector/InspectorMemoryAgent.h
deleted file mode 100644 (file)
index b3cd2ff..0000000
+++ /dev/null
@@ -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)
index 4a0cefb..77bade7 100644 (file)
@@ -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 @@ void InspectorTimelineAgent::didCompleteCurrentRecord(TimelineRecordType type)
     }
 }
 
-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)
index 00ca6ae..694559e 100644 (file)
@@ -47,7 +47,6 @@ class Event;
 class FloatQuad;
 class Frame;
 class InspectorClient;
-class InspectorMemoryAgent;
 class InspectorPageAgent;
 class InstrumentingAgents;
 class IntRect;
@@ -127,7 +126,7 @@ class InspectorTimelineAgent
 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 @@ private:
     Page* page();
 
     InspectorPageAgent* m_pageAgent;
-    InspectorMemoryAgent* m_memoryAgent;
     TimelineTimeConverter m_timeConverter;
 
     std::unique_ptr<Inspector::InspectorTimelineFrontendDispatcher> m_frontendDispatcher;
index 96d58a2..d0e8f2b 100644 (file)
@@ -98,7 +98,7 @@ WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope& workerGl
 
     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()) {
diff --git a/Source/WebCore/inspector/protocol/Memory.json b/Source/WebCore/inspector/protocol/Memory.json
deleted file mode 100644 (file)
index 4077e83..0000000
+++ /dev/null
@@ -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" }
-            ]
-        }
-    ]
-}
index 6a0e3ae..666fc49 100644 (file)
@@ -1,3 +1,12 @@
+2014-02-25  Andreas Kling  <akling@apple.com>
+
+        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  <timothy@apple.com>
 
         Switch from prefixed CSS gradient to unprefixed.
index 7349cd5..df9359d 100644 (file)
@@ -183,10 +183,6 @@ InspectorBackend.registerCommand("LayerTree.disable", [], []);
 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"});