зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
ae41a2f55c
Коммит
c5d74fa7e2
|
@ -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);
|
||||
}
|
||||
|
||||
var button = document.getElementById('security-button');
|
||||
if (button && window._content)
|
||||
securityUI.init(window._content, button);
|
||||
var button = document.getElementById("security-button");
|
||||
if (button && _content)
|
||||
securityUI.init(_content, button);
|
||||
}
|
||||
}
|
||||
|
||||
function displayPageInfo()
|
||||
|
|
Загрузка…
Ссылка в новой задаче