Closed Bug 282050 Opened 20 years ago Closed 19 years ago

browser.xul.error_pages.enabled should take effect immediately in the same window/tab

Categories

(Core :: DOM: Navigation, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: mcsmurf, Assigned: vhaarr+bmo)

References

Details

Attachments

(1 file, 1 obsolete file)

When you change the value of browser.xul.error_pages.enabled, it only takes
effect after the next restart. It should take effect immediately.
Summary: browser.xul.error_pages.enabled should take effect immediatelly → browser.xul.error_pages.enabled should take effect immediately
WFM (takes effect immediately) with Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.8b2) Gecko/20050224 Firefox/1.0+
WFM as well:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050224
Firefox/1.0+
er, this works for you two in currently opened windows/tabs?
Hmm actually no, it won't work in the same tab that I change the pref in but if
I open a new tab it works there. That's not what the summary describes though.
Morph the bug?
Summary: browser.xul.error_pages.enabled should take effect immediately → browser.xul.error_pages.enabled should take effect immediately in the same window/tab
my understanding is that this bug always was about that problem, but anyway,
let's use it for that one.
A change to "browser.xul.error_pages.enabled" does indeed take effect
immediately.  But note that if you set it to "false", a restart of FF always
returns it to "true".  Apparently "true" is the only acceptable state, and
"false" is only allowed temporarily.

Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.8b2) Gecko/20050316 Firefox/1.0+
(In reply to comment #6)
> A change to "browser.xul.error_pages.enabled" does indeed take effect
> immediately.  But note that if you set it to "false", a restart of FF always
> returns it to "true".

This is bug 286553


Forget my last comment! I had an error in my user.js file.
This caused bug 300864
aaron: there is no patch on this bug...
(In reply to comment #10)
> aaron: there is no patch on this bug...

Okay, wrong bug. Whichever bug was used to turn on XUL error pages caused the
problem.
Attached patch version 0.1 (obsolete) — Splinter Review
It says in adamlock@eircom.net's bugzilla name "not reading bugs". I'm guessing
that he still does reviews, so requesting review from him.

It seems docshells are pretty static regarding prefs, so when we add observing
for one, maybe we should observe the others as well? That'd be a new bug in any
case.
Assignee: adamlock → vhaarr+bmo
Status: NEW → ASSIGNED
Attachment #196144 - Flags: review?(adamlock)
Attachment #196144 - Flags: review?(adamlock) → review?(bzbarsky)
Comment on attachment 196144 [details] [diff] [review]
version 0.1

biesi, could you take a look at this?  I won't be able to for a good long
while....  If you don't have time either, just punt back to me, I guess.
Attachment #196144 - Flags: review?(bzbarsky) → review?(cbiesinger)
Comment on attachment 196144 [details] [diff] [review]
version 0.1

yes, I think docshell should observe the other prefs too.


+    if (!nsCRT::strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) &&
+	 !nsCRT::strcmp(aData,
+	   NS_LITERAL_STRING("browser.xul.error_pages.enabled").get()) &&
+	 mObserveErrorPages) {

you should move the mObserveErrorPages check first, since it's fastest to check

r=biesi with that; thanks for the patch!
Attachment #196144 - Flags: review?(cbiesinger) → review+
Attached patch version 0.2Splinter Review
biesi: Thanks!

When we're done with this bug, I'll file a new one about removing the mPrefs
member from docshell altogether, and make use of pref observers instead.
Attachment #196144 - Attachment is obsolete: true
Attachment #196598 - Flags: superreview?(jst)
Attachment #196598 - Flags: review+
Comment on attachment 196598 [details] [diff] [review]
version 0.2

sr=jst
Attachment #196598 - Flags: superreview?(jst) → superreview+
biesi: Think you could help me check this in?

Filed bug 309654.
Checking in docshell/base/nsDocShell.cpp;
/cvsroot/mozilla/docshell/base/nsDocShell.cpp,v  <--  nsDocShell.cpp
new revision: 1.743; previous revision: 1.742
done
Checking in docshell/base/nsDocShell.h;
/cvsroot/mozilla/docshell/base/nsDocShell.h,v  <--  nsDocShell.h
new revision: 1.191; previous revision: 1.190
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: