diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index eecb605bd57..72525b58625 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -1026,6 +1026,9 @@ nsGlobalWindow::~nsGlobalWindow() PR_REMOVE_AND_INIT_LINK(w); } } else { + Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS, + mMutationBits ? 1 : 0); + if (mListenerManager) { mListenerManager->Disconnect(); mListenerManager = nsnull; @@ -2387,6 +2390,9 @@ nsGlobalWindow::InnerSetNewDocument(nsIDocument* aDocument) mLastOpenedURI = aDocument->GetDocumentURI(); #endif + Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS, + mMutationBits ? 1 : 0); + // Clear our mutation bitfield. mMutationBits = 0; diff --git a/js/xpconnect/src/Makefile.in b/js/xpconnect/src/Makefile.in index 2ea91af7e3c..ec585f95376 100644 --- a/js/xpconnect/src/Makefile.in +++ b/js/xpconnect/src/Makefile.in @@ -153,7 +153,7 @@ endif nsXPConnect.$(OBJ_SUFFIX): dom_quickstubs.h -xpcjsruntime.$(OBJ_SUFFIX): dom_quickstubs.h +XPCJSRuntime.$(OBJ_SUFFIX): dom_quickstubs.h dom_quickstubs.h: dom_quickstubs.cpp diff --git a/toolkit/components/telemetry/TelemetryHistograms.h b/toolkit/components/telemetry/TelemetryHistograms.h index 3ab8e6e57fe..601ddd498c6 100644 --- a/toolkit/components/telemetry/TelemetryHistograms.h +++ b/toolkit/components/telemetry/TelemetryHistograms.h @@ -233,3 +233,5 @@ HISTOGRAM(THUNDERBIRD_GLODA_SIZE_MB, 1, 1000, 40, LINEAR, "Gloda: size of global HISTOGRAM(THUNDERBIRD_CONVERSATIONS_TIME_TO_2ND_GLODA_QUERY_MS, 1, 10000, 30, EXPONENTIAL, "Conversations: time between the moment we click and the second gloda query returns (ms)") HISTOGRAM(THUNDERBIRD_INDEXING_RATE_MSG_PER_S, 1, 100, 20, LINEAR, "Gloda: indexing rate (message/s)") #endif + +HISTOGRAM(INNERWINDOWS_WITH_MUTATION_LISTENERS, 0, 1, 2, BOOLEAN, "Deleted or to-be-reused innerwindow which has had mutation event listeners.")