Bug 1461696 - Add telemetry for DOMAttrModified event. r=smaug

MozReview-Commit-ID: D6cjCJB92ex

--HG--
extra : amend_source : dbc6529d056040dbc3e87c3099e4a259c4638548
This commit is contained in:
Xidorn Quan 2018-05-16 08:42:48 +10:00
parent 6ed31b7c54
commit 150bb2e75b
2 changed files with 4 additions and 0 deletions

View File

@ -46,3 +46,4 @@ DEPRECATED_OPERATION(OrientationEvent)
DEPRECATED_OPERATION(ProximityEvent)
DEPRECATED_OPERATION(AmbientLightEvent)
DEPRECATED_OPERATION(IDBOpenDBOptions_StorageType)
DEPRECATED_OPERATION(DOMAttrModifiedEvent)

View File

@ -326,6 +326,9 @@ EventListenerManager::AddEventListenerInternal(
nsCOMPtr<nsIDocument> doc = window->GetExtantDoc();
if (doc) {
doc->WarnOnceAbout(nsIDocument::eMutationEvent);
if (aEventMessage == eLegacyAttrModified) {
doc->WarnOnceAbout(nsIDocument::eDOMAttrModifiedEvent);
}
}
// If aEventMessage is eLegacySubtreeModified, we need to listen all
// mutations. nsContentUtils::HasMutationListeners relies on this.