Title: [102187] trunk/Source/WebCore
Revision
102187
Author
[email protected]
Date
2011-12-06 15:49:19 -0800 (Tue, 06 Dec 2011)

Log Message

Web Inspector: introduce a memory agent stub.
https://bugs.webkit.org/show_bug.cgi?id=73930

Reviewed by Timothy Hatcher.

We'd like to experiment with the memory stats and hence need a
nice home for that. Adding this undocumented agent / domain for now.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptProfiler.h:
(WebCore::ScriptProfiler::nodeCount):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::nodeCount):
* bindings/v8/ScriptProfiler.h:
* inspector/Inspector.json:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorMemoryAgent.cpp: Added.
(WebCore::InspectorMemoryAgent::~InspectorMemoryAgent):
(WebCore::InspectorMemoryAgent::getNodeCounter):
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
* inspector/InspectorMemoryAgent.h: Added.
(WebCore::InspectorMemoryAgent::create):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (102186 => 102187)


--- trunk/Source/WebCore/CMakeLists.txt	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/CMakeLists.txt	2011-12-06 23:49:19 UTC (rev 102187)
@@ -886,6 +886,7 @@
     inspector/InspectorFrontendClientLocal.cpp
     inspector/InspectorFrontendHost.cpp
     inspector/InspectorInstrumentation.cpp
+    inspector/InspectorMemoryAgent.cpp
     inspector/InspectorProfilerAgent.cpp
     inspector/InspectorResourceAgent.cpp
     inspector/InspectorRuntimeAgent.cpp

Modified: trunk/Source/WebCore/ChangeLog (102186 => 102187)


--- trunk/Source/WebCore/ChangeLog	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/ChangeLog	2011-12-06 23:49:19 UTC (rev 102187)
@@ -1,3 +1,34 @@
+2011-12-06  Pavel Feldman  <[email protected]>
+
+        Web Inspector: introduce a memory agent stub.
+        https://bugs.webkit.org/show_bug.cgi?id=73930
+
+        Reviewed by Timothy Hatcher.
+
+        We'd like to experiment with the memory stats and hence need a
+        nice home for that. Adding this undocumented agent / domain for now.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/ScriptProfiler.h:
+        (WebCore::ScriptProfiler::nodeCount):
+        * bindings/v8/ScriptProfiler.cpp:
+        (WebCore::ScriptProfiler::nodeCount):
+        * bindings/v8/ScriptProfiler.h:
+        * inspector/Inspector.json:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::InspectorController):
+        * inspector/InspectorMemoryAgent.cpp: Added.
+        (WebCore::InspectorMemoryAgent::~InspectorMemoryAgent):
+        (WebCore::InspectorMemoryAgent::getNodeCounter):
+        (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
+        * inspector/InspectorMemoryAgent.h: Added.
+        (WebCore::InspectorMemoryAgent::create):
+
 2011-12-06  Julien Chaffraix  <[email protected]>
 
         Unreviewed build fix after 102183.

Modified: trunk/Source/WebCore/GNUmakefile.list.am (102186 => 102187)


--- trunk/Source/WebCore/GNUmakefile.list.am	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2011-12-06 23:49:19 UTC (rev 102187)
@@ -2067,6 +2067,8 @@
 	Source/WebCore/inspector/InspectorFrontendHost.h \
 	Source/WebCore/inspector/InspectorInstrumentation.cpp \
 	Source/WebCore/inspector/InspectorInstrumentation.h \
+	Source/WebCore/inspector/InspectorMemoryAgent.cpp \
+	Source/WebCore/inspector/InspectorMemoryAgent.h \
 	Source/WebCore/inspector/InspectorPageAgent.cpp \
 	Source/WebCore/inspector/InspectorPageAgent.h \
 	Source/WebCore/inspector/InspectorProfilerAgent.cpp \

Modified: trunk/Source/WebCore/Target.pri (102186 => 102187)


--- trunk/Source/WebCore/Target.pri	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/Target.pri	2011-12-06 23:49:19 UTC (rev 102187)
@@ -866,6 +866,7 @@
     inspector/InspectorFrontendClientLocal.cpp \
     inspector/InspectorFrontendHost.cpp \
     inspector/InspectorInstrumentation.cpp \
+    inspector/InspectorMemoryAgent.cpp \
     inspector/InspectorPageAgent.cpp \
     inspector/InspectorProfilerAgent.cpp \
     inspector/InspectorResourceAgent.cpp \
@@ -1910,6 +1911,7 @@
     inspector/InspectorFrontendClientLocal.h \
     inspector/InspectorFrontendHost.h \
     inspector/InspectorInstrumentation.h \
+    inspector/InspectorMemoryAgent.h \
     inspector/InspectorPageAgent.h \
     inspector/InspectorProfilerAgent.h \
     inspector/InspectorResourceAgent.h \

Modified: trunk/Source/WebCore/WebCore.gypi (102186 => 102187)


--- trunk/Source/WebCore/WebCore.gypi	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/WebCore.gypi	2011-12-06 23:49:19 UTC (rev 102187)
@@ -2755,6 +2755,8 @@
             'inspector/InspectorFrontendHost.h',
             'inspector/InspectorInstrumentation.cpp',
             'inspector/InspectorInstrumentation.h',
+            'inspector/InspectorMemoryAgent.cpp',
+            'inspector/InspectorMemoryAgent.h',
             'inspector/InspectorPageAgent.cpp',
             'inspector/InspectorPageAgent.h',
             'inspector/InspectorProfilerAgent.cpp',

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (102186 => 102187)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2011-12-06 23:49:19 UTC (rev 102187)
@@ -68534,6 +68534,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\inspector\InspectorMemoryAgent.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\inspector\InspectorMemoryAgent.h"
+				>
+			</File>
+			<File
 				RelativePath="..\inspector\InspectorPageAgent.cpp"
 				>
 			</File>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (102186 => 102187)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-12-06 23:49:19 UTC (rev 102187)
@@ -1819,6 +1819,8 @@
 		7AA365EE12E7265400DCA242 /* InspectorRuntimeAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AA365ED12E7265400DCA242 /* InspectorRuntimeAgent.cpp */; };
 		7AA51B6E1483B61600AD2752 /* InspectorBaseAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AA51B6C1483B61600AD2752 /* InspectorBaseAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AA51B6D1483B61600AD2752 /* InspectorBaseAgent.cpp */; };
+		7AA51DD5148506A900AD2752 /* InspectorMemoryAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AA51DD3148506A900AD2752 /* InspectorMemoryAgent.cpp */; };
+		7AA51DD6148506A900AD2752 /* InspectorMemoryAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AA51DD4148506A900AD2752 /* InspectorMemoryAgent.h */; };
 		7AB0B1C01211A62200A76940 /* InspectorDatabaseAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */; };
 		7AB0B1C11211A62200A76940 /* InspectorDatabaseAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */; };
 		7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */; };
@@ -9066,6 +9068,8 @@
 		7AA365ED12E7265400DCA242 /* InspectorRuntimeAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorRuntimeAgent.cpp; sourceTree = "<group>"; };
 		7AA51B6C1483B61600AD2752 /* InspectorBaseAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorBaseAgent.h; sourceTree = "<group>"; };
 		7AA51B6D1483B61600AD2752 /* InspectorBaseAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBaseAgent.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>"; };
 		7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDatabaseAgent.cpp; sourceTree = "<group>"; };
 		7AB0B1BF1211A62200A76940 /* InspectorDatabaseAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDatabaseAgent.h; sourceTree = "<group>"; };
 		7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuProvider.h; sourceTree = "<group>"; };
@@ -14548,6 +14552,8 @@
 				7A0E770D10C00A8800A0276E /* InspectorFrontendHost.idl */,
 				20D629241253690B00081543 /* InspectorInstrumentation.cpp */,
 				20D629251253690B00081543 /* InspectorInstrumentation.h */,
+				7AA51DD3148506A900AD2752 /* InspectorMemoryAgent.cpp */,
+				7AA51DD4148506A900AD2752 /* InspectorMemoryAgent.h */,
 				4F6FDD621341DEDD001F8EE3 /* InspectorPageAgent.cpp */,
 				4F6FDD631341DEDD001F8EE3 /* InspectorPageAgent.h */,
 				9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */,
@@ -24742,6 +24748,7 @@
 				A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */,
 				312C0C41146DC6CC0016C911 /* Notification.h in Headers */,
 				3128CA6B147331630074C72A /* NotificationController.h in Headers */,
+				7AA51DD6148506A900AD2752 /* InspectorMemoryAgent.h in Headers */,
 				5038BF2814750F190095E0D1 /* CustomFilterOperation.h in Headers */,
 				5038BF2914750F190095E0D1 /* FilterOperation.h in Headers */,
 				5038BF2B14750F190095E0D1 /* FilterOperations.h in Headers */,
@@ -27619,6 +27626,7 @@
 				7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */,
 				A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */,
 				3128CA68147331520074C72A /* NotificationController.cpp in Sources */,
+				7AA51DD5148506A900AD2752 /* InspectorMemoryAgent.cpp in Sources */,
 				5038BF2A14750F190095E0D1 /* FilterOperations.cpp in Sources */,
 				6E3FAD3814733F4000E42306 /* JSWebGLCompressedTextures.cpp in Sources */,
 				6E3FAE8E14733FDB00E42306 /* WebGLCompressedTextures.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/ScriptProfiler.h (102186 => 102187)


--- trunk/Source/WebCore/bindings/js/ScriptProfiler.h	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/bindings/js/ScriptProfiler.h	2011-12-06 23:49:19 UTC (rev 102187)
@@ -58,6 +58,8 @@
     static bool causesRecompilation() { return true; }
     static bool isSampling() { return false; }
     static bool hasHeapProfiler() { return false; }
+    // FIXME: Implement this counter for JSC. See bug 73936 for more details.
+    static unsigned domNodeCount() { return 0; }
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp (102186 => 102187)


--- trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp	2011-12-06 23:49:19 UTC (rev 102187)
@@ -35,6 +35,7 @@
 #include "InspectorValues.h"
 #include "RetainedDOMInfo.h"
 #include "V8Binding.h"
+#include "V8DOMMap.h"
 #include "V8Node.h"
 
 #include <v8-profiler.h>
@@ -145,5 +146,44 @@
 #endif // ENABLE(INSPECTOR)
 }
 
+namespace {
 
+class CounterVisitor : public DOMWrapperMap<Node>::Visitor {
+public:
+    CounterVisitor() : m_count(0) { }
+
+    void visitDOMWrapper(DOMDataStore* store, Node* node, v8::Persistent<v8::Object> wrapper)
+    {
+        Node* rootNode = node;
+        while (rootNode->parentNode())
+            rootNode = rootNode->parentNode();
+
+        if (m_roots.contains(rootNode))
+            return;
+        m_roots.add(rootNode);
+
+        Node* currentNode = rootNode;
+        while ((currentNode = currentNode->traverseNextNode(rootNode)))
+            ++m_count;
+    }
+
+    unsigned nodeCount()
+    {
+        return m_count;
+    }
+private:
+    HashSet<Node*> m_roots;
+    unsigned m_count;
+};
+
+} // namespace
+
+unsigned ScriptProfiler::domNodeCount()
+{
+    CounterVisitor counterVisitor;
+    visitDOMNodes(&counterVisitor);
+    return counterVisitor.nodeCount();
+}
+
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/bindings/v8/ScriptProfiler.h (102186 => 102187)


--- trunk/Source/WebCore/bindings/v8/ScriptProfiler.h	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/bindings/v8/ScriptProfiler.h	2011-12-06 23:49:19 UTC (rev 102187)
@@ -63,6 +63,7 @@
     static bool isSampling() { return true; }
     static bool hasHeapProfiler() { return true; }
     static void initialize();
+    static unsigned domNodeCount();
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/inspector/Inspector.json (102186 => 102187)


--- trunk/Source/WebCore/inspector/Inspector.json	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/inspector/Inspector.json	2011-12-06 23:49:19 UTC (rev 102187)
@@ -46,6 +46,18 @@
         ]
     },
     {
+        "domain": "Memory",
+        "hidden": true,
+        "commands": [
+            {
+                "name": "getDOMNodeCount",
+                "returns": [
+                    { "name": "count", "type": "integer" }
+                ]
+            }
+        ]
+    },
+    {
         "domain": "Page",
         "description": "Actions and events related to the inspected page belong to the page domain.",
         "types": [

Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (102186 => 102187)


--- trunk/Source/WebCore/inspector/InspectorController.cpp	2011-12-06 23:46:50 UTC (rev 102186)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp	2011-12-06 23:49:19 UTC (rev 102187)
@@ -53,6 +53,7 @@
 #include "InspectorFrontend.h"
 #include "InspectorFrontendClient.h"
 #include "InspectorInstrumentation.h"
+#include "InspectorMemoryAgent.h"
 #include "InspectorPageAgent.h"
 #include "InspectorProfilerAgent.h"
 #include "InspectorResourceAgent.h"
@@ -135,6 +136,8 @@
     m_agents.append(InspectorWorkerAgent::create(m_instrumentingAgents.get(), m_state.get()));
 #endif
 
+    m_agents.append(InspectorMemoryAgent::create(m_instrumentingAgents.get(), m_state.get(), m_page));
+
     ASSERT_ARG(inspectorClient, inspectorClient);
     m_injectedScriptManager->injectedScriptHost()->init(m_inspectorAgent
         , consoleAgent

Added: trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp (0 => 102187)


--- trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	                        (rev 0)
+++ trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2011-12-06 23:49:19 UTC (rev 102187)
@@ -0,0 +1,63 @@
+/*
+* 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"
+#include "InspectorMemoryAgent.h"
+
+#if ENABLE(INSPECTOR)
+
+#include "InspectorState.h"
+#include "InspectorValues.h"
+#include "InstrumentingAgents.h"
+#include "Node.h"
+#include "Page.h"
+#include "ScriptProfiler.h"
+#include <wtf/HashSet.h>
+
+namespace WebCore {
+
+InspectorMemoryAgent::~InspectorMemoryAgent()
+{
+}
+
+void InspectorMemoryAgent::getDOMNodeCount(ErrorString*, int* result)
+{
+    *result = ScriptProfiler::domNodeCount();
+}
+
+InspectorMemoryAgent::InspectorMemoryAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, Page* page)
+    : InspectorBaseAgent<InspectorMemoryAgent>("Memory", instrumentingAgents, state)
+    , m_page(page)
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR)
Property changes on: trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp
___________________________________________________________________

Added: svn:eol-style

Added: trunk/Source/WebCore/inspector/InspectorMemoryAgent.h (0 => 102187)


--- trunk/Source/WebCore/inspector/InspectorMemoryAgent.h	                        (rev 0)
+++ trunk/Source/WebCore/inspector/InspectorMemoryAgent.h	2011-12-06 23:49:19 UTC (rev 102187)
@@ -0,0 +1,71 @@
+/*
+* 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 "InspectorBaseAgent.h"
+#include <wtf/PassOwnPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+class InspectorFrontend;
+class InspectorState;
+class InspectorArray;
+class InstrumentingAgents;
+class Page;
+
+typedef String ErrorString;
+
+class InspectorMemoryAgent : public InspectorBaseAgent<InspectorMemoryAgent> {
+    WTF_MAKE_NONCOPYABLE(InspectorMemoryAgent);
+public:
+    typedef Vector<OwnPtr<InspectorBaseAgentInterface> > InspectorAgents;
+
+    static PassOwnPtr<InspectorMemoryAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, Page* page)
+    {
+        return adoptPtr(new InspectorMemoryAgent(instrumentingAgents, state, page));
+    }
+
+    void getDOMNodeCount(ErrorString*, int* result);
+
+    ~InspectorMemoryAgent();
+
+private:
+    InspectorMemoryAgent(InstrumentingAgents*, InspectorState*, Page*);
+    Page* m_page;
+};
+
+} // namespace WebCore
+
+#endif // !ENABLE(INSPECTOR)
+#endif // !defined(InspectorMemoryAgent_h)
Property changes on: trunk/Source/WebCore/inspector/InspectorMemoryAgent.h
___________________________________________________________________

Added: svn:eol-style

_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to