Bug 1341011 Pass uri objects in originatingURI for addon install notifications r=mossop a=gchang
authorAndrew Swan <aswan@mozilla.com>
Wed, 01 Mar 2017 21:17:46 -0800
changeset 557971 a4bbf308dbdfe199a234421c8e44665caf009851
parent 557970 62467dd7218ffb48be7d4406d98ded5d0909fcfc
child 557972 a786773148122f212b9335baaf89c5fb19ce5a58
push id52846
push usernthomas@mozilla.com
push dateFri, 07 Apr 2017 10:33:06 +0000
reviewersmossop, gchang
bugs1341011
milestone53.0
Bug 1341011 Pass uri objects in originatingURI for addon install notifications r=mossop a=gchang MozReview-Commit-ID: LGRSDdbzIxK
toolkit/mozapps/extensions/content/extensions.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -1344,17 +1344,17 @@ var gViewController = {
         if (fp.show() != nsIFilePicker.returnOK)
           return;
 
         let browser = getBrowserElement();
         let files = fp.files;
         while (files.hasMoreElements()) {
           let file = files.getNext();
           AddonManager.getInstallForFile(file, install => {
-            AddonManager.installAddonFromAOM(browser, document.documentURI, install);
+            AddonManager.installAddonFromAOM(browser, document.documentURIObject, install);
           });
         }
       }
     },
 
     cmd_debugAddons: {
       isEnabled() {
         return true;
@@ -3887,16 +3887,16 @@ var gDragDrop = {
         let file = dataTransfer.mozGetDataAt("application/x-moz-file", i);
         if (file) {
           url = Services.io.newFileURI(file).spec;
         }
       }
 
       if (url) {
         AddonManager.getInstallForURL(url, install => {
-          AddonManager.installAddonFromAOM(browser, document.documentURI, install);
+          AddonManager.installAddonFromAOM(browser, document.documentURIObject, install);
         }, "application/x-xpinstall");
       }
     }
 
     aEvent.preventDefault();
   }
 };