284084 - setting "ask before sanitizing" and "sanitize on shutdown" opens a broken sanitize window on shutdown.

This commit is contained in:
ben%bengoodger.com 2005-03-02 05:27:19 +00:00
Родитель ec5ff278c0
Коммит cffe704b58
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -88,7 +88,8 @@
// In non-instant apply mode, we must try and use the last saved state
// from any previous opens of a child dialog instead of the value from
// preferences, to pick up any edits a user may have made.
if (document.documentElement.type == "child" && !this.instantApply) {
if (document.documentElement.type == "child" &&
!this.instantApply && window.opener) {
var pdoc = window.opener.document;
var lastStatePref = pdoc.getElementById(window.location.href + "#" + this.id);
this._setValue(lastStatePref ? lastStatePref.value
@ -758,7 +759,7 @@
if (!this._fireEvent("beforeaccept", this))
return;
if (this.type == "child") {
if (this.type == "child" && window.opener) {
var psvc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var instantApply = psvc.getBoolPref("browser.preferences.instantApply");