Bug 1377767 - Fix idle dispatch call to gather memory in Telemetry; r?erahm
The Services.tm.mainThread.idleDispatch API was renamed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1368072 to
Services.tm.idleDispatchToMainThread.
MozReview-Commit-ID: CZdH4DQdvNz
--- a/toolkit/components/telemetry/TelemetrySession.jsm
+++ b/toolkit/components/telemetry/TelemetrySession.jsm
@@ -1971,17 +1971,17 @@ var Impl = {
break;
case TOPIC_CYCLE_COLLECTOR_BEGIN:
let now = new Date();
if (!gLastMemoryPoll
|| (TELEMETRY_INTERVAL <= now - gLastMemoryPoll)) {
gLastMemoryPoll = now;
this._log.trace("Dispatching idle gatherMemory task");
- Services.tm.mainThread.idleDispatch(() => {
+ Services.tm.idleDispatchToMainThread(() => {
this._log.trace("Running idle gatherMemory task");
this.gatherMemory();
return true;
});
}
break;
case "xul-window-visible":
this.removeObserver("xul-window-visible");