inspector/InspectorCSSAgent.cpp
inspector/InspectorClient.cpp
inspector/InspectorController.cpp
- inspector/InspectorCounters.cpp
inspector/InspectorDOMAgent.cpp
inspector/InspectorDOMDebuggerAgent.cpp
inspector/InspectorDOMStorageAgent.cpp
+2014-02-26 Andreas Kling <akling@apple.com>
+
+ Remove unused InspectorCounters.
+ <https://webkit.org/b/129367>
+
+ The InspectorCounters code was only used to implement two layout test
+ APIs (window.internals.numberOfLive{Nodes,Documents}) yet it had hooks
+ in crazy places like Node construction and destruction.
+
+ Rewrote the internals APIs to iterate over all live Documents instead,
+ totaling up their referencing Node count. Added a process-global
+ Document::allDocuments() HashSet to make this whole thing possible.
+
+ Reviewed by Sam Weinig.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * WebCore.exp.in:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSEventListener.cpp:
+ * dom/Document.cpp:
+ (WebCore::Document::allDocuments):
+ (WebCore::Document::Document):
+ (WebCore::Document::~Document):
+ * dom/Document.h:
+ (WebCore::Node::Node):
+ * dom/Node.cpp:
+ (WebCore::Node::~Node):
+ * inspector/InspectorAllInOne.cpp:
+ * inspector/InspectorCounters.cpp: Removed.
+ * inspector/InspectorCounters.h: Removed.
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::start):
+ (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
+ (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
+ * inspector/InspectorTimelineAgent.h:
+ * inspector/protocol/Timeline.json:
+ * platform/ThreadGlobalData.cpp:
+ * testing/Internals.cpp:
+ (WebCore::Internals::numberOfLiveNodes):
+ (WebCore::Internals::numberOfLiveDocuments):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2014-02-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove console.profiles from window.console API
Source/WebCore/inspector/InspectorConsoleInstrumentation.h \
Source/WebCore/inspector/InspectorController.cpp \
Source/WebCore/inspector/InspectorController.h \
- Source/WebCore/inspector/InspectorCounters.cpp \
- Source/WebCore/inspector/InspectorCounters.h \
Source/WebCore/inspector/InspectorDOMAgent.cpp \
Source/WebCore/inspector/InspectorDOMAgent.h \
Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp \
__ZN7WebCore8BlobData14setContentTypeERKN3WTF6StringE
__ZN7WebCore8CSSValue7destroyEv
__ZN7WebCore8Document11createRangeEv
+__ZN7WebCore8Document12allDocumentsEv
__ZN7WebCore8Document12updateLayoutEv
__ZN7WebCore8Document13createElementERKNS_13QualifiedNameEb
__ZN7WebCore8Document14createTextNodeERKN3WTF6StringE
#if ENABLE(INSPECTOR)
__ZN7WebCore15InspectorClient31doDispatchMessageOnFrontendPageEPNS_4PageERKN3WTF6StringE
-__ZN7WebCore17InspectorCounters12counterValueENS0_11CounterTypeE
__ZN7WebCore19InspectorController15connectFrontendEPN9Inspector24InspectorFrontendChannelE
__ZN7WebCore19InspectorController18disconnectFrontendEN9Inspector25InspectorDisconnectReasonE
__ZN7WebCore19InspectorController18setProfilerEnabledEb
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="..\inspector\InspectorCounters.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\InspectorCSSAgent.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ClInclude Include="..\inspector\InspectorClient.h" />
<ClInclude Include="..\inspector\InspectorConsoleInstrumentation.h" />
<ClInclude Include="..\inspector\InspectorController.h" />
- <ClInclude Include="..\inspector\InspectorCounters.h" />
<ClInclude Include="..\inspector\InspectorCSSAgent.h" />
<ClInclude Include="..\inspector\InspectorDatabaseAgent.h" />
<ClInclude Include="..\inspector\InspectorDatabaseInstrumentation.h" />
<ClCompile Include="..\inspector\InspectorController.cpp">
<Filter>inspector</Filter>
</ClCompile>
- <ClCompile Include="..\inspector\InspectorCounters.cpp">
- <Filter>inspector</Filter>
- </ClCompile>
<ClCompile Include="..\inspector\InspectorCSSAgent.cpp">
<Filter>inspector</Filter>
</ClCompile>
<ClInclude Include="..\inspector\InspectorController.h">
<Filter>inspector</Filter>
</ClInclude>
- <ClInclude Include="..\inspector\InspectorCounters.h">
- <Filter>inspector</Filter>
- </ClInclude>
<ClInclude Include="..\inspector\InspectorCSSAgent.h">
<Filter>inspector</Filter>
</ClInclude>
F12171F516A8CED2000053CA /* WebVTTElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F12171F316A8BC63000053CA /* WebVTTElement.cpp */; };
F12171F616A8CF0B000053CA /* WebVTTElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F12171F416A8BC63000053CA /* WebVTTElement.h */; };
F293B27E56C112F373FFF27E /* DNSResolveQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C60128060078BB70E367A95 /* DNSResolveQueue.cpp */; };
- F325A40A14EE36FA007324E2 /* InspectorCounters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F325A40814EE36FA007324E2 /* InspectorCounters.cpp */; };
- F325A40B14EE36FA007324E2 /* InspectorCounters.h in Headers */ = {isa = PBXBuildFile; fileRef = F325A40914EE36FA007324E2 /* InspectorCounters.h */; settings = {ATTRIBUTES = (Private, ); }; };
F33F0282120947F200E5743A /* ScriptProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F33F0281120947F200E5743A /* ScriptProfile.cpp */; };
F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
F344C75311294D9D00F26EEE /* InspectorFrontendClientLocal.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C75211294D9D00F26EEE /* InspectorFrontendClientLocal.h */; settings = {ATTRIBUTES = (Private, ); }; };
EDEC98020AED7E170059137F /* WebCorePrefix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCorePrefix.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
F12171F316A8BC63000053CA /* WebVTTElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebVTTElement.cpp; sourceTree = "<group>"; };
F12171F416A8BC63000053CA /* WebVTTElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVTTElement.h; sourceTree = "<group>"; };
- F325A40814EE36FA007324E2 /* InspectorCounters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorCounters.cpp; sourceTree = "<group>"; };
- F325A40914EE36FA007324E2 /* InspectorCounters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorCounters.h; sourceTree = "<group>"; };
F33F0281120947F200E5743A /* ScriptProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptProfile.cpp; sourceTree = "<group>"; };
F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontendClient.h; sourceTree = "<group>"; };
F344C75211294D9D00F26EEE /* InspectorFrontendClientLocal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontendClientLocal.h; sourceTree = "<group>"; };
F3F5CF1012ED81A80084C569 /* InspectorConsoleInstrumentation.h */,
1C81B9570E97330800266E07 /* InspectorController.cpp */,
1C81B9560E97330800266E07 /* InspectorController.h */,
- F325A40814EE36FA007324E2 /* InspectorCounters.cpp */,
- F325A40914EE36FA007324E2 /* InspectorCounters.h */,
82AB1741124B99EC00C5069D /* InspectorCSSAgent.cpp */,
82AB1742124B99EC00C5069D /* InspectorCSSAgent.h */,
7AB0B1BE1211A62200A76940 /* InspectorDatabaseAgent.cpp */,
1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */,
F3F5CF1112ED81A80084C569 /* InspectorConsoleInstrumentation.h in Headers */,
1C81B95A0E97330800266E07 /* InspectorController.h in Headers */,
- F325A40B14EE36FA007324E2 /* InspectorCounters.h in Headers */,
82AB1744124B99EC00C5069D /* InspectorCSSAgent.h in Headers */,
4A9CC82116BF9BB400EC645A /* InspectorCSSOMWrappers.h in Headers */,
7AB0B1C11211A62200A76940 /* InspectorDatabaseAgent.h in Headers */,
B885E8D411E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp in Sources */,
7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */,
1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */,
- F325A40A14EE36FA007324E2 /* InspectorCounters.cpp in Sources */,
82AB1743124B99EC00C5069D /* InspectorCSSAgent.cpp in Sources */,
4A9CC82016BF9BB400EC645A /* InspectorCSSOMWrappers.cpp in Sources */,
7AB0B1C01211A62200A76940 /* InspectorDatabaseAgent.cpp in Sources */,
#include "BeforeUnloadEvent.h"
#include "Event.h"
#include "Frame.h"
-#include "InspectorCounters.h"
#include "JSEvent.h"
#include "JSEventTarget.h"
#include "JSMainThreadExecState.h"
}
#endif
+HashSet<Document*>& Document::allDocuments()
+{
+ static NeverDestroyed<HashSet<Document*>> documents;
+ return documents;
+}
+
Document::Document(Frame* frame, const URL& url, unsigned documentClasses, unsigned constructionFlags)
: ContainerNode(*this, CreateDocument)
, TreeScope(*this)
, m_hasInjectedPlugInsScript(false)
, m_renderTreeBeingDestroyed(false)
{
+ allDocuments().add(this);
+
// We depend on the url getting immediately set in subframes, but we
// also depend on the url NOT getting immediately set in opened windows.
// See fast/dom/early-frame-url.html
for (unsigned i = 0; i < WTF_ARRAY_LENGTH(m_nodeListAndCollectionCounts); ++i)
m_nodeListAndCollectionCounts[i] = 0;
-
- InspectorCounters::incrementCounter(InspectorCounters::DocumentCounter);
}
static void histogramMutationEventUsage(const unsigned short& listenerTypes)
Document::~Document()
{
+ allDocuments().remove(this);
+
ASSERT(!renderView());
ASSERT(!m_inPageCache);
ASSERT(m_ranges.isEmpty());
for (unsigned i = 0; i < WTF_ARRAY_LENGTH(m_nodeListAndCollectionCounts); ++i)
ASSERT(!m_nodeListAndCollectionCounts[i]);
-
- InspectorCounters::decrementCounter(InspectorCounters::DocumentCounter);
}
void Document::removedLastRef()
#include "FocusDirection.h"
#include "HitTestRequest.h"
#include "IconURL.h"
-#include "InspectorCounters.h"
#include "MutationObserver.h"
#include "PageVisibilityState.h"
#include "PlatformScreen.h"
}
}
+ unsigned referencingNodeCount() const { return m_referencingNodeCount; }
+
void removedLastRef();
+ static HashSet<Document*>& allDocuments();
+
MediaQueryMatcher& mediaQueryMatcher();
using ContainerNode::ref;
#if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS)
trackForDebugging();
#endif
-
- InspectorCounters::incrementCounter(InspectorCounters::NodeCounter);
}
inline ScriptExecutionContext* Node::scriptExecutionContext() const
willBeDeletedFrom(document());
document().decrementReferencingNodeCount();
-
- InspectorCounters::decrementCounter(InspectorCounters::NodeCounter);
}
void Node::willBeDeletedFrom(Document& document)
#include "InspectorCSSAgent.cpp"
#include "InspectorClient.cpp"
#include "InspectorController.cpp"
-#include "InspectorCounters.cpp"
#include "InspectorDOMAgent.cpp"
#include "InspectorDOMDebuggerAgent.cpp"
#include "InspectorDOMStorageAgent.cpp"
+++ /dev/null
-/*
-* Copyright (C) 2012 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 "InspectorCounters.h"
-
-namespace WebCore {
-
-int InspectorCounters::s_counters[CounterTypeLength];
-
-int InspectorCounters::counterValue(CounterType type)
-{
- return s_counters[type];
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
+++ /dev/null
-/*
-* Copyright (C) 2012 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 InspectorCounters_h
-#define InspectorCounters_h
-
-#include <wtf/FastMalloc.h>
-
-#if !ASSERT_DISABLED
-#include <wtf/MainThread.h>
-#if PLATFORM(IOS)
-#include "WebCoreThread.h"
-#endif
-#endif
-
-namespace WebCore {
-
-class InspectorCounters {
-public:
- enum CounterType {
- DocumentCounter,
- NodeCounter,
- JSEventListenerCounter,
- CounterTypeLength
- };
-
- static inline void incrementCounter(CounterType type)
- {
-#if ENABLE(INSPECTOR)
- ASSERT(isMainThread());
- ++s_counters[type];
-#else
- UNUSED_PARAM(type);
-#endif
- }
-
- static inline void decrementCounter(CounterType type)
- {
-#if ENABLE(INSPECTOR)
- ASSERT(isMainThread());
- --s_counters[type];
-#else
- UNUSED_PARAM(type);
-#endif
- }
-
-#if ENABLE(INSPECTOR)
- static int counterValue(CounterType);
-#endif
-
-private:
- InspectorCounters();
-
-#if ENABLE(INSPECTOR)
- static int s_counters[CounterTypeLength];
-#endif
-};
-
-} // namespace WebCore
-
-#endif // !defined(InspectorCounters_h)
#include "Frame.h"
#include "FrameView.h"
#include "InspectorClient.h"
-#include "InspectorCounters.h"
#include "InspectorInstrumentation.h"
#include "InspectorPageAgent.h"
#include "InspectorWebFrontendDispatchers.h"
stop(&error);
}
-void InspectorTimelineAgent::start(ErrorString*, const int* maxCallStackDepth, const bool* includeDomCounters)
+void InspectorTimelineAgent::start(ErrorString*, const int* maxCallStackDepth)
{
if (!m_frontendDispatcher)
return;
else
m_maxCallStackDepth = 5;
- if (includeDomCounters)
- m_includeDOMCounters = *includeDomCounters;
-
m_timeConverter.reset();
m_instrumentingAgents->setInspectorTimelineAgent(this);
RefPtr<Inspector::TypeBuilder::Timeline::TimelineEvent> record = Inspector::TypeBuilder::Timeline::TimelineEvent::runtimeCast(prpRecord);
- setDOMCounters(record.get());
-
if (m_recordStack.isEmpty())
sendEvent(record.release());
else {
return JSDOMWindow::commonVM()->heap.size();
}
-void InspectorTimelineAgent::setDOMCounters(Inspector::TypeBuilder::Timeline::TimelineEvent* record)
-{
- record->setUsedHeapSize(usedHeapSize());
-
- if (m_includeDOMCounters) {
- int documentCount = 0;
- int nodeCount = 0;
- if (m_inspectorType == PageInspector) {
- documentCount = InspectorCounters::counterValue(InspectorCounters::DocumentCounter);
- nodeCount = InspectorCounters::counterValue(InspectorCounters::NodeCounter);
- }
- RefPtr<Inspector::TypeBuilder::Timeline::DOMCounters> counters = Inspector::TypeBuilder::Timeline::DOMCounters::create()
- .setDocuments(documentCount)
- .setNodes(nodeCount);
- record->setCounters(counters.release());
- }
-}
-
void InspectorTimelineAgent::setFrameIdentifier(InspectorObject* record, Frame* frame)
{
if (!frame || !m_pageAgent)
, m_client(client)
, m_weakFactory(this)
, m_enabled(false)
- , m_includeDOMCounters(false)
, m_recordingProfile(false)
{
}
virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
- virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* includeDomCounters) override;
+ virtual void start(ErrorString*, const int* maxCallStackDepth) override;
virtual void stop(ErrorString*) override;
virtual void canMonitorMainThread(ErrorString*, bool*) override;
virtual void supportsFrameInstrumentation(ErrorString*, bool*) override;
void appendRecord(PassRefPtr<Inspector::InspectorObject> data, TimelineRecordType, bool captureCallStack, Frame*);
void pushCurrentRecord(PassRefPtr<Inspector::InspectorObject>, TimelineRecordType, bool captureCallStack, Frame*);
- void setDOMCounters(Inspector::TypeBuilder::Timeline::TimelineEvent* record);
void setFrameIdentifier(Inspector::InspectorObject* record, Frame*);
void didCompleteCurrentRecord(TimelineRecordType);
WeakPtrFactory<InspectorTimelineAgent> m_weakFactory;
bool m_enabled;
- bool m_includeDOMCounters;
bool m_recordingProfile;
};
"domain": "Timeline",
"description": "Timeline provides its clients with instrumentation records that are generated during the page runtime. Timeline instrumentation can be started and stopped using corresponding commands. While timeline is started, it is generating timeline event records.",
"types": [
- {
- "id": "DOMCounters",
- "type": "object",
- "properties": [
- { "name": "documents", "type": "integer" },
- { "name": "nodes", "type": "integer" }
- ],
- "description": "Current values of DOM counters."
- },
{
"id": "EventType",
"type": "string",
{ "name": "thread", "type": "string", "optional": true, "description": "If present, identifies the thread that produced the event." },
{ "name": "data", "type": "object", "description": "Event data." },
{ "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." },
- { "name": "counters", "$ref": "DOMCounters", "optional": true, "description": "Current values of DOM counters." },
{ "name": "usedHeapSize", "type": "integer", "optional": true, "description": "Current size of JS heap." }
],
"description": "Timeline record contains information about the recorded activity."
{
"name": "start",
"parameters": [
- { "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5." },
- { "name": "includeDomCounters", "optional": true, "type": "boolean", "description": "Whether DOM counters data should be included into timeline events." }
+ { "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5." }
],
"description": "Starts capturing instrumentation events."
},
#include "CachedResourceRequestInitiators.h"
#include "EventNames.h"
-#include "InspectorCounters.h"
#include "TextCodecICU.h"
#include "ThreadTimers.h"
#include <wtf/MainThread.h>
#include "HistoryItem.h"
#include "InspectorClient.h"
#include "InspectorController.h"
-#include "InspectorCounters.h"
#include "InspectorForwarding.h"
#include "InspectorFrontendClientLocal.h"
#include "InspectorInstrumentation.h"
return contextDocument()->domWindow()->console()->profiles();
}
-#if ENABLE(INSPECTOR)
unsigned Internals::numberOfLiveNodes() const
{
- return InspectorCounters::counterValue(InspectorCounters::NodeCounter);
+ unsigned nodeCount = 0;
+ for (auto* document : Document::allDocuments())
+ nodeCount += document->referencingNodeCount();
+ return nodeCount;
}
unsigned Internals::numberOfLiveDocuments() const
{
- return InspectorCounters::counterValue(InspectorCounters::DocumentCounter);
+ return Document::allDocuments().size();
}
+#if ENABLE(INSPECTOR)
Vector<String> Internals::consoleMessageArgumentCounts() const
{
Document* document = contextDocument();
const ProfilesArray& consoleProfiles() const;
-#if ENABLE(INSPECTOR)
unsigned numberOfLiveNodes() const;
unsigned numberOfLiveDocuments() const;
+
+#if ENABLE(INSPECTOR)
Vector<String> consoleMessageArgumentCounts() const;
PassRefPtr<DOMWindow> openDummyInspectorFrontend(const String& url);
void closeDummyInspectorFrontend();
// FIXME: this will lead to BUG interals.consoleProfiles !== interals.consoleProfiles as profile will always returns new array.
readonly attribute ScriptProfile[] consoleProfiles;
- [Conditional=INSPECTOR] unsigned long numberOfLiveNodes();
- [Conditional=INSPECTOR] unsigned long numberOfLiveDocuments();
+ unsigned long numberOfLiveNodes();
+ unsigned long numberOfLiveDocuments();
[Conditional=INSPECTOR] sequence<DOMString> consoleMessageArgumentCounts();
[Conditional=INSPECTOR] DOMWindow openDummyInspectorFrontend(DOMString url);
[Conditional=INSPECTOR] void closeDummyInspectorFrontend();
symbolWithPointer(?broadcast@ThreadCondition@WTF@@QAEXXZ, ?broadcast@ThreadCondition@WTF@@QEAAXXZ)
symbolWithPointer(?callOnMainThread@WTF@@YAXP6AXPAX@Z0@Z, ?callOnMainThread@WTF@@YAXP6AXPEAX@Z0@Z)
#if ENABLE(INSPECTOR)
- ?counterValue@InspectorCounters@WebCore@@SAHW4CounterType@12@@Z
symbolWithPointer(?didBeginFrame@InspectorController@WebCore@@QAEXXZ, ?didBeginFrame@InspectorController@WebCore@@QEAAXXZ)
symbolWithPointer(?didCancelFrame@InspectorController@WebCore@@QAEXXZ, ?didCancelFrame@InspectorController@WebCore@@QEAAXXZ)
#endif
symbolWithPointer(??0String@WTF@@QAE@PB_WI@Z, ??0String@WTF@@QEAA@PEB_WI@Z)
symbolWithPointer(??0String@WTF@@QAE@VASCIILiteral@1@@Z, ??0String@WTF@@QEAA@VASCIILiteral@1@@Z)
symbolWithPointer(??1SerializedScriptValue@WebCore@@QAE@XZ, ??1SerializedScriptValue@WebCore@@QEAA@XZ)
+ symbolWithPointer(?allDocuments@Document@WebCore@@SAAAV?$HashSet@PAVDocument@WebCore@@U?$PtrHash@PAVDocument@WebCore@@@WTF@@U?$HashTraits@PAVDocument@WebCore@@@4@@WTF@@XZ)
symbolWithPointer(?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z, ?absoluteBoundingBoxRect@RenderObject@WebCore@@QEBA?AVIntRect@2@_N@Z)
symbolWithPointer(?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ, ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QEBA?AVIntRect@2@XZ)
symbolWithPointer(?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ, ?description@DocumentMarker@WebCore@@QEBAAEBVString@WTF@@XZ)