Backed out changeset 36b80b663e2c (bug 1348691) for uplifting inappropriate patch. rs+a=jorgk
authorJorg K
Thu, 04 May 2017 15:54:45 +0200
changeset 27880 18a456796cf1c6ce4bb2f207a08cb66e40111222
parent 27879 04c943f9712f042787cefbb18f1179149a058562
child 27881 b8034a160796746409a3a2a002243f3531e21198
push id1892
push usermozilla@jorgk.com
push dateThu, 04 May 2017 14:05:09 +0000
treeherdercomm-esr52@b8034a160796 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1348691
backs out36b80b663e2c6d12b289890571ee058a0874fe27
Backed out changeset 36b80b663e2c (bug 1348691) for uplifting inappropriate patch. rs+a=jorgk
mail/components/cloudfile/nsBox.js
--- a/mail/components/cloudfile/nsBox.js
+++ b/mail/components/cloudfile/nsBox.js
@@ -774,24 +774,23 @@ nsBoxFileUploader.prototype = {
       if (this.callback)
         this.callback(this.requestObserver,
                       Ci.nsIMsgCloudFileProvider.uploadErr);
     }.bind(this);
 
     req.setRequestHeader("Authorization", "Bearer " + this.box._oauth.accessToken);
 
     // Encode the form.
-    File.createFromNsIFile(this.file).then(file => {
-      let form = Cc["@mozilla.org/files/formdata;1"]
-                   .createInstance(Ci.nsIDOMFormData);
-      form.append("filename", file, this.file.leafName);
-      form.append("parent_id", this.box._cachedFolderId);
+    let file = new File(this.file);
+    let form = Cc["@mozilla.org/files/formdata;1"]
+                 .createInstance(Ci.nsIDOMFormData);
+    form.append("filename", file, this.file.leafName);
+    form.append("parent_id", this.box._cachedFolderId);
 
-      req.send(form);
-    });
+    req.send(form);
   },
 
   /**
    * Cancels the upload request for the file associated with this Uploader.
    */
   cancel: function nsBox_cancel() {
     this.log.info("in uploader cancel");
     this.callback(this.requestObserver, Ci.nsIMsgCloudFileProvider.uploadCanceled);