Closed
Bug 259979
Opened 20 years ago
Closed 20 years ago
Changes to keyword.URL require restarting Firefox
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla1.8beta1
People
(Reporter: jruderman, Assigned: darin.moz)
References
()
Details
(Keywords: helpwanted, Whiteboard: [good first bug])
Attachments
(2 files)
4.06 KB,
patch
|
Biesinger
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
4.05 KB,
patch
|
Details | Diff | Splinter Review |
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.
Comment 1•20 years ago
|
||
http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/keyword/src/nsKeywordProtocolHandler.cpp#65
OS: Windows XP → All
Hardware: PC → All
Version: 1.7 Branch → Trunk
Assignee | ||
Comment 2•20 years ago
|
||
yeah, this should be easy to fix.
Reporter | ||
Comment 3•20 years ago
|
||
Should this be fixed by getting rid of init() and the member variable, or by
observing changes to preferences and calling init() again?
Assignee | ||
Comment 4•20 years ago
|
||
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.
Attachment #165753 -
Flags: review?(cbiesinger)
Comment 6•20 years ago
|
||
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 darin@meer.net for superreview.
Attachment #165753 -
Flags: review?(cbiesinger) → review+
Attachment #165753 -
Flags: superreview?(darin)
Assignee | ||
Comment 7•20 years ago
|
||
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+
Assignee | ||
Comment 10•20 years ago
|
||
no need to re-request reviews after people gave +
fixed-on-trunk
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•20 years ago
|
Target Milestone: Future → mozilla1.8beta
Comment 11•20 years ago
|
||
This wasn't firefox specific, was it?
You need to log in
before you can comment on or make changes to this bug.
Description
•