Bug 1546854 - always set the value of _downloaderName in downloadUpdate. r=bytesized
☠☠ backed out by 189987dd4544 ☠ ☠
authorRobert Strong <robert.bugzilla@gmail.com>
Thu, 25 Apr 2019 16:01:14 +0000
changeset 530153 765b4140cde753ee6ac95d3cbc0c84003a007a1c
parent 530152 8fce6b3574a7d1f5d0c74998c7ba0742bc448e24
child 530154 e2ee2fb416dc1d46529cf63269dcdef7a45c27ae
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbytesized
bugs1546854
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1546854 - always set the value of _downloaderName in downloadUpdate. r=bytesized Differential Revision: https://phabricator.services.mozilla.com/D28767
toolkit/mozapps/update/UpdateService.jsm
--- a/toolkit/mozapps/update/UpdateService.jsm
+++ b/toolkit/mozapps/update/UpdateService.jsm
@@ -3695,17 +3695,17 @@ Downloader.prototype = {
    * The start time of the first download attempt in milliseconds for telemetry.
    */
   _startDownloadMs: null,
 
   /**
    * The name of the downloader being used to download the update. This is used
    * when setting property names on the update patch for telemetry.
    */
-  _downloaderName: "bits",
+  _downloaderName: null,
 
   /**
    * Cancels the active download.
    *
    * For a BITS download, this will cancel and remove the download job. For
    * an nsIIncrementalDownload, this will stop the download, but leaves the
    * data around to allow the transfer to be resumed later.
    */
@@ -3943,19 +3943,18 @@ Downloader.prototype = {
     this._patch.QueryInterface(Ci.nsIWritablePropertyBag);
     this.isCompleteUpdate = this._patch.type == "complete";
 
     let canUseBits = this._canUseBits(this._patch);
     // Allow the advertised update to disable BITS.
     if (this._update.getProperty("disableBITS") != null) {
       canUseBits = false;
     }
-    if (!canUseBits) {
-      this._downloaderName = "internal";
-    }
+
+    this._downloaderName = canUseBits ? "bits" : "internal";
     if (!this._patch.getProperty(this._downloaderName + "DownloadStart")) {
       this._patch.setProperty(this._downloaderName + "DownloadStart", Math.floor(Date.now() / 1000));
     }
 
     if (!canUseBits) {
       let patchFile = getUpdatesDir().clone();
       patchFile.append(FILE_UPDATE_MAR);