Bug 599632 - Remove duplicate initialization. r=mfinkle
authorHonza Bambas <honzab.moz@firemni.cz>
Mon, 11 Oct 2010 11:09:00 -0400
changeset 2227 c87808b19e9b8bcb0ee52f0b935626c77cd179df
parent 2226 752348a6b3e528b72515dbdfacd67169c2d2b491
child 2228 1632eb8b2186261ec10d6c4c61cea54e039e0b98
push id1881
push userjmatthews@mozilla.com
push dateTue, 19 Oct 2010 18:24:47 +0000
reviewersmfinkle
bugs599632
Bug 599632 - Remove duplicate initialization. r=mfinkle
chrome/content/bindings/browser.js
chrome/content/bindings/browser.xml
--- a/chrome/content/bindings/browser.js
+++ b/chrome/content/bindings/browser.js
@@ -159,32 +159,19 @@ let SecurityUI = {
       // Check whether this site is a security exception. XPConnect does the right
       // thing here in terms of converting _lastLocation.port from string to int, but
       // the overrideService doesn't like undefined ports, so make sure we have
       // something in the default case (bug 432241).
       result.isException = !!this._overrideService.hasMatchingOverride(content.location.hostname, (content.location.port || 443), cert, {}, {});
     }
 
     return result;
-  },
-
-  init: function() {
-    addMessageListener("SecurityUI:Init", this);
-  },
-
-  receiveMessage: function(aMessage) {
-    const SECUREBROWSERUI_CONTRACTID = "@mozilla.org/secure_browser_ui;1";
-    let securityUI = Cc[SECUREBROWSERUI_CONTRACTID].createInstance(Ci.nsISecureBrowserUI);
-    securityUI.init(content);
   }
 };
 
-SecurityUI.init();
-
-
 let WebNavigation =  {
   _webNavigation: docShell.QueryInterface(Ci.nsIWebNavigation),
 
   init: function() {
     addMessageListener("WebNavigation:GoBack", this);
     addMessageListener("WebNavigation:GoForward", this);
     addMessageListener("WebNavigation:GotoIndex", this);
     addMessageListener("WebNavigation:LoadURI", this);
--- a/chrome/content/bindings/browser.xml
+++ b/chrome/content/bindings/browser.xml
@@ -50,23 +50,16 @@
           xmlns="http://www.mozilla.org/xbl"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <binding id="local-browser" extends="chrome://global/content/bindings/browser.xml#browser">
     <implementation type="application/javascript" implements="nsIAccessibleProvider, nsIObserver, nsIDOMEventListener, nsIFrameMessageListener">
       <field name="_securityUI">null</field>
       <property name="securityUI">
         <getter><![CDATA[
-          if (!this._securityUI) {
-            const SECUREBROWSERUI_CONTRACTID = "@mozilla.org/secure_browser_ui;1";
-            if (!this.hasAttribute("disablesecurity") && SECUREBROWSERUI_CONTRACTID in Components.classes) {
-              this.messageManager.sendAsyncMessage('SecurityUI:Init', { });
-            }
-          }
-
           return this._securityUI || {};
         ]]></getter>
         <setter><![CDATA[
           this._securityUI = val;
         ]]></setter>
       </property>
 
       <field name="_searchEngines">[]</field>