Bug 1525762: Part 1f - Fix dodgy error message. r=aswan
authorKris Maglione <maglione.k@gmail.com>
Fri, 22 Mar 2019 09:37:38 -0700
changeset 466966 e8e9739ac28b03a09001c60674dd6699fa9741af
parent 466965 cc45935ed2c2f3ae4627584f5c7318cb52271875
child 466967 d7e4177fca6f63b1703687ad809048904e2415c2
push id35789
push userbtara@mozilla.com
push dateSun, 31 Mar 2019 09:00:52 +0000
treeherdermozilla-central@c06dfc552c64 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1525762
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 1525762: Part 1f - Fix dodgy error message. r=aswan The filePath property is used in error messages, and is expected to be a string. Setting it to a nsIFile object makes those error messages inscrutable.
toolkit/mozapps/extensions/internal/XPIInstall.jsm
--- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
@@ -3654,17 +3654,17 @@ var XPIInstall = {
     // something it can use.
     if (baseURL.scheme !== "resource") {
       throw new Error("Built-in addons must use resource: URLS");
     }
 
     // Enough of the Package interface to allow loadManifest() to work.
     let pkg = {
       rootURI: baseURL,
-      filePath: baseURL,
+      filePath: baseURL.spec,
       file: null,
       verifySignedState() {
         return {
           signedState: AddonManager.SIGNEDSTATE_NOT_REQUIRED,
           cert: null,
         };
       },
       async hasResource(path) {