If you change keyword.URL but don't restart Firefox, keyword searches (triggered by typing non-URLs into the address bar) still use the old keyword.URL.
OS: Windows XP → All
Hardware: PC → All
Version: 1.7 Branch → Trunk
yeah, this should be easy to fix.
Whiteboard: [good first bug]
Target Milestone: --- → Future
Should this be fixed by getting rid of init() and the member variable, or by observing changes to preferences and calling init() again?
since keyword URLs are not loaded that often, it might be better to just check the pref each time it is needed instead of implementing an observer scheme.
Check keyword.URL pref each time it is needed by removing Init() function and place code inside NewChannel(). Also removed redundant mKeywordURL member.
Comment on attachment 165753 [details] [diff] [review] hack v0 r=biesi, although I think it would be better to return NS_ERROR_NOT_AVAILABLE if the pref isn't available or empty. please ask email@example.com for superreview.
Attachment #165753 - Flags: review?(cbiesinger) → review+
Comment on attachment 165753 [details] [diff] [review] hack v0 >Index: netwerk/protocol/keyword/src/nsKeywordProtocolHandler.cpp >+ nsXPIDLCString url; >+ rv = prefs->GetCharPref("keyword.URL", getter_Copies(url)); >+ // if we can't find a keyword.URL keywords won't work. >+ if (NS_FAILED(rv) || !url || !*url) return NS_ERROR_FAILURE; I think there is no reason to make this check so complex. This is all you need: nsXPIDLCString url; prefs->GetCharPref("keyword.URL", getter_Copies(url)); // if we can't find a keyword.URL keywords won't work. if (url.IsEmpty()) return NS_ERROR_FAILURE; sr=darin with that change.
Attachment #165753 - Flags: superreview?(darin) → superreview+
Do I need to request r= and sr= again?
no need to re-request reviews after people gave + fixed-on-trunk
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
This wasn't firefox specific, was it?
You need to log in before you can comment on or make changes to this bug.