Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if...
[WebKit-https.git] / Source / WebCore / testing / Internals.cpp
index e409e56ff7d90ba36a213e51754c7a5cb245d820..6f2ee33a7ab68f26fd107197e818766af19f5067 100644 (file)
@@ -42,6 +42,7 @@
 #include "HTMLNames.h"
 #include "HTMLTextAreaElement.h"
 #include "InspectorController.h"
+#include "InspectorCounters.h"
 #include "InspectorInstrumentation.h"
 #include "InternalSettings.h"
 #include "IntRect.h"
@@ -770,6 +771,18 @@ bool Internals::hasSpellingMarker(Document* document, int from, int length, Exce
     return document->frame()->editor()->selectionStartHasMarkerFor(DocumentMarker::Spelling, from, length);
 }
 
+#if ENABLE(INSPECTOR)
+unsigned Internals::numberOfLiveNodes() const
+{
+    return InspectorCounters::counterValue(InspectorCounters::NodeCounter);
+}
+
+unsigned Internals::numberOfLiveDocuments() const
+{
+    return InspectorCounters::counterValue(InspectorCounters::DocumentCounter);
+}
+#endif // ENABLE(INSPECTOR)
+
 bool Internals::hasGrammarMarker(Document* document, int from, int length, ExceptionCode&)
 {
     if (!document || !document->frame())