Bug 711993 - Catch exception thrown by uri.host in PermissionsHelper observer. r=mfinkle
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Thu, 12 Jan 2012 13:29:14 -0800
changeset 84439 40993c4c18d0dbec72587051a314a41abae69ab6
parent 84438 21d52deaef00ae570639be613e9cc34fe7002840
child 84440 1e60b2e0c8a3dbd171e7308dd0785e313bd5f1bd
push id21848
push usermak77@bonardo.net
push dateSat, 14 Jan 2012 09:02:20 +0000
treeherdermozilla-central@27a7f197c6fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs711993
milestone12.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 711993 - Catch exception thrown by uri.host in PermissionsHelper observer. r=mfinkle
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3632,20 +3632,26 @@ var PermissionsHelper = {
             type: type,
             setting: setting
           });
         }
 
         // Keep track of permissions, so we know which ones to clear
         this._currentPermissions = permissions; 
 
+        let host;
+        try {
+          host = uri.host;
+        } catch(e) {
+          host = uri.spec;
+        }
         sendMessageToJava({
           gecko: {
             type: "Permissions:Data",
-            host: uri.host,
+            host: host,
             permissions: permissions
           }
         });
         break;
  
       case "Permissions:Clear":
         // An array of the indices of the permissions we want to clear
         let permissionsToClear = JSON.parse(aData);