Changeset 100222 in webkit
- Timestamp:
- Nov 14, 2011 5:23:35 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r100214 r100222 1 2011-11-14 Rafael Weinstein <rafaelw@chromium.org> 2 3 [MutationObservers] Add histogram collection for usage of DOM Mutation Events 4 https://bugs.webkit.org/show_bug.cgi?id=72316 5 6 Reviewed by Ryosuke Niwa. 7 8 This patch adds six calls in ~Document() which simply pipe-out to the embedder 9 the (already-collected) bits of whether varous DOM Mutation Events were registered 10 on the document. 11 12 No tests needed. No functional changes. 13 14 * dom/Document.cpp: 15 (WebCore::histogramMutationEventUsage): 16 (WebCore::Document::~Document): 17 1 18 2011-11-14 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/Source/WebCore/dom/Document.cpp
r100170 r100222 158 158 #include <wtf/text/StringBuffer.h> 159 159 160 #if PLATFORM(CHROMIUM) 161 #include "PlatformSupport.h" 162 #endif 163 160 164 #if ENABLE(SHARED_WORKERS) 161 165 #include "SharedWorkerRepository.h" … … 494 498 } 495 499 500 #if PLATFORM(CHROMIUM) 501 static void histogramMutationEventUsage(const unsigned short& listenerTypes) 502 { 503 PlatformSupport::histogramEnumeration("DOMAPI.PerDocumentMutationEventUsage.DOMSubtreeModified", static_cast<bool>(listenerTypes & Document::DOMSUBTREEMODIFIED_LISTENER), 2); 504 PlatformSupport::histogramEnumeration("DOMAPI.PerDocumentMutationEventUsage.DOMNodeInserted", static_cast<bool>(listenerTypes & Document::DOMNODEINSERTED_LISTENER), 2); 505 PlatformSupport::histogramEnumeration("DOMAPI.PerDocumentMutationEventUsage.DOMNodeRemoved", static_cast<bool>(listenerTypes & Document::DOMNODEREMOVED_LISTENER), 2); 506 PlatformSupport::histogramEnumeration("DOMAPI.PerDocumentMutationEventUsage.DOMNodeRemovedFromDocument", static_cast<bool>(listenerTypes & Document::DOMNODEREMOVEDFROMDOCUMENT_LISTENER), 2); 507 PlatformSupport::histogramEnumeration("DOMAPI.PerDocumentMutationEventUsage.DOMNodeInsertedIntoDocument", static_cast<bool>(listenerTypes & Document::DOMNODEINSERTEDINTODOCUMENT_LISTENER), 2); 508 PlatformSupport::histogramEnumeration("DOMAPI.PerDocumentMutationEventUsage.DOMCharacterDataModified", static_cast<bool>(listenerTypes & Document::DOMCHARACTERDATAMODIFIED_LISTENER), 2); 509 } 510 #endif 511 496 512 Document::~Document() 497 513 { … … 505 521 506 522 m_scriptRunner.clear(); 523 524 #if PLATFORM(CHROMIUM) 525 histogramMutationEventUsage(m_listenerTypes); 526 #endif 507 527 508 528 removeAllEventListeners();
Note: See TracChangeset
for help on using the changeset viewer.