Bug 644582 - 0x80004005 (NS_ERROR_FAILURE) location: JS frame :: resource://testpilot/modules/feedback.js :: FeedbackManager_isInputUrl :: line 109 [r=mark.finkle]
authorJono X <jdicarlo@mozilla.com>
Mon, 11 Apr 2011 22:30:44 -0400
changeset 67886 071b5fff3154
parent 67885 09fd35793821
child 67887 8929076380f4
push id19453
push usermfinkle@mozilla.com
push dateTue, 12 Apr 2011 02:35:14 +0000
treeherdermozilla-central@2a2c474ec4a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs644582
milestone2.2a1pre
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 644582 - 0x80004005 (NS_ERROR_FAILURE) location: JS frame :: resource://testpilot/modules/feedback.js :: FeedbackManager_isInputUrl :: line 109 [r=mark.finkle]
browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/feedback.js
--- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/feedback.js
+++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/feedback.js
@@ -99,22 +99,28 @@ var FeedbackManager = {
 
   isInputUrl: function FeedbackManager_isInputUrl(url) {
     /* Return true if the URL belongs to one of the pages of the Input website.  We can
      * identify these by looking for a domain of input.mozilla.com and a page name ending
      * in 'feedback', 'happy', or 'sad'.
      */
     let ioService = Cc["@mozilla.org/network/io-service;1"]
       .getService(Ci.nsIIOService);
-    let uri = ioService.newURI(url, null, null);
-    let path = uri.path;
-    if (uri.host == "input.mozilla.com") {
-      if (path.indexOf("feedback" > -1) || path.indexOf("happy" > -1) || path.indexOf("sad" > -1)) {
-        return true;
+    try {
+      let uri = ioService.newURI(url, null, null);
+      let path = uri.path;
+      if (uri.host == "input.mozilla.com") {
+        if (path.indexOf("feedback" > -1) || path.indexOf("happy" > -1) || path.indexOf("sad" > -1)) {
+          return true;
+        }
       }
+    } catch(e) {
+      /* newURI throws an exception if we try to parse urls like "about:config".  (Bug 644582)
+       * Those are not the urls we're looking for anyway. */
+      return false;
     }
     return false;
   },
 
   setCurrUrl: function FeedbackManager_setCurrUrl(url) {
     this._lastVisitedUrl = url;
   },