зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1428529
- ensure window.opener.Preferences is defined; r=jaws
MozReview-Commit-ID: DNvpuQplNgb
This commit is contained in:
Родитель
93dcf044db
Коммит
ea1a751cdb
|
@ -819,7 +819,16 @@ WindowHelper.prototype = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Services.ww.registerNotification(windowObserver);
|
Services.ww.registerNotification(windowObserver);
|
||||||
Services.ww.openWindow(null,
|
|
||||||
|
let browserWin = null;
|
||||||
|
if (Services.appinfo.OS !== "Darwin") {
|
||||||
|
// Retrieve the browser window so we can specify it as the parent
|
||||||
|
// of the dialog to simulate the way the user opens the dialog
|
||||||
|
// on Windows and Linux.
|
||||||
|
browserWin = Services.wm.getMostRecentWindow("navigator:browser");
|
||||||
|
}
|
||||||
|
|
||||||
|
Services.ww.openWindow(browserWin,
|
||||||
"chrome://browser/content/sanitize.xul",
|
"chrome://browser/content/sanitize.xul",
|
||||||
"SanitizeDialog",
|
"SanitizeDialog",
|
||||||
"chrome,titlebar,dialog,centerscreen,modal",
|
"chrome,titlebar,dialog,centerscreen,modal",
|
||||||
|
|
|
@ -302,6 +302,7 @@ const Preferences = window.Preferences = (function() {
|
||||||
// preferences, to pick up any edits a user may have made.
|
// preferences, to pick up any edits a user may have made.
|
||||||
|
|
||||||
if (Preferences.type == "child" && window.opener &&
|
if (Preferences.type == "child" && window.opener &&
|
||||||
|
window.opener.Preferences &&
|
||||||
Services.scriptSecurityManager.isSystemPrincipal(window.opener.document.nodePrincipal)) {
|
Services.scriptSecurityManager.isSystemPrincipal(window.opener.document.nodePrincipal)) {
|
||||||
// Try to find the preference in the parent window.
|
// Try to find the preference in the parent window.
|
||||||
const preference = window.opener.Preferences.get(this.name);
|
const preference = window.opener.Preferences.get(this.name);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче