Bug 811088 - about:telemetry causes startup info to be gathered multiple times

This commit is contained in:
Vladan Djeric 2012-11-12 17:01:26 -05:00
parent b18ac8a615
commit d1746428a0

View File

@ -992,8 +992,11 @@ TelemetryPing.prototype = {
}).bind(this), Ci.nsIThread.DISPATCH_NORMAL);
break;
case "get-payload":
this.gatherMemory();
// This handler returns the current Telemetry payload to the caller.
// We only gather startup info once.
if (Object.keys(this._slowSQLStartup).length == 0)
this.gatherStartupInformation();
this.gatherMemory();
let data = this.getCurrentSessionPayloadAndSlug("gather-payload");
aSubject.QueryInterface(Ci.nsISupportsString).data = data.payload;