Bug 1245136 - Discard old-format pending Telemetry files. r=gfritzsche
authorHarshit Harchani <hharchani@gmail.com>
Thu, 03 Mar 2016 06:31:02 +0530
changeset 336821 8606450976580d2c7aa74c3d48adcc7543a693c5
parent 336820 bde14028c597bc3079a9ab23016a9ee27f5ae0ae
child 336822 101e093a539c544f178ef7b01b34ca70b08f8816
push id12189
push usercku@mozilla.com
push dateFri, 04 Mar 2016 07:52:22 +0000
reviewersgfritzsche
bugs1245136
milestone47.0a1
Bug 1245136 - Discard old-format pending Telemetry files. r=gfritzsche
toolkit/components/telemetry/TelemetryStorage.jsm
--- a/toolkit/components/telemetry/TelemetryStorage.jsm
+++ b/toolkit/components/telemetry/TelemetryStorage.jsm
@@ -1571,20 +1571,16 @@ var TelemetryStorageImpl = {
       throw new PingReadError(e.message, e.becauseNoSuchFile);
     }
 
     let decoder = new TextDecoder();
     let string = decoder.decode(array);
     let ping;
     try {
       ping = JSON.parse(string);
-      // The ping's payload used to be stringified JSON.  Deal with that.
-      if (typeof(ping.payload) == "string") {
-        ping.payload = JSON.parse(ping.payload);
-      }
     } catch (e) {
       this._log.trace("loadPingfile - unparseable ping " + aFilePath, e);
       yield OS.File.remove(aFilePath).catch((ex) => {
         this._log.error("loadPingFile - failed removing unparseable ping file", ex);
       });
       throw new PingParseError(e.message);
     }