mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Only try to create an instance of the secure browser UI if PSM is installed. Bug=76292, r=timeless, sr=ben
This commit is contained in:
parent
e737ebab3b
commit
62e75a5468
@ -27,17 +27,19 @@ var securityUI;
|
||||
|
||||
function SetSecurityButton()
|
||||
{
|
||||
var ui = Components.classes["@mozilla.org/secure_browser_ui;1"].createInstance();
|
||||
securityUI = ui.QueryInterface(Components.interfaces.nsSecureBrowserUI);
|
||||
const ui = Components.classes["@mozilla.org/secure_browser_ui;1"];
|
||||
if (ui) {
|
||||
var securityUI = ui.createInstance(Components.interfaces.nsSecureBrowserUI);
|
||||
|
||||
if ("gBrowser" in window) { // XXXjag see bug 68662
|
||||
gBrowser.boxObject.setPropertyAsSupports("xulwindow", window);
|
||||
gBrowser.boxObject.setPropertyAsSupports("secureBrowserUI", securityUI);
|
||||
if ("gBrowser" in window) { // XXXjag see bug 68662
|
||||
gBrowser.boxObject.setPropertyAsSupports("xulwindow", window);
|
||||
gBrowser.boxObject.setPropertyAsSupports("secureBrowserUI", securityUI);
|
||||
}
|
||||
|
||||
var button = document.getElementById("security-button");
|
||||
if (button && _content)
|
||||
securityUI.init(_content, button);
|
||||
}
|
||||
|
||||
var button = document.getElementById('security-button');
|
||||
if (button && window._content)
|
||||
securityUI.init(window._content, button);
|
||||
}
|
||||
|
||||
function displayPageInfo()
|
||||
|
Loading…
Reference in New Issue
Block a user