Bug 1464252 - Remove global observers functionality from the observer service; r=froydnj

MozReview-Commit-ID: HGtG3obDryw

--HG--
extra : rebase_source : fd73d6da5727ca01f6e71fed8d4dc95751d3a7a0
This commit is contained in:
Gabriele Svelto 2018-05-24 23:58:31 +02:00
parent 1d38d6b282
commit 08f7efc25a

View File

@ -23,8 +23,6 @@
#include "nsString.h"
#include "GeckoProfiler.h"
#define NOTIFY_GLOBAL_OBSERVERS
static const uint32_t kMinTelemetryNotifyObserversLatencyMs = 1;
// Log module for nsObserverService logging...
@ -297,13 +295,6 @@ NS_IMETHODIMP nsObserverService::NotifyObservers(nsISupports* aSubject,
observerList->NotifyObservers(aSubject, aTopic, aSomeData);
}
#ifdef NOTIFY_GLOBAL_OBSERVERS
observerList = mObserverTopicTable.GetEntry("*");
if (observerList) {
observerList->NotifyObservers(aSubject, aTopic, aSomeData);
}
#endif
uint32_t latencyMs = round((TimeStamp::Now() - start).ToMilliseconds());
if (latencyMs >= kMinTelemetryNotifyObserversLatencyMs) {
Telemetry::Accumulate(Telemetry::NOTIFY_OBSERVERS_LATENCY_MS,