Closed
Bug 479408
Opened 15 years ago
Closed 15 years ago
search engine discovery code doesn't properly handle frames ("browser is null" in BrowserSearch::addEngine)
Categories
(Firefox :: Search, defect)
Tracking
()
RESOLVED
FIXED
Firefox 3.6a1
People
(Reporter: matt, Assigned: zeniko)
References
()
Details
(Keywords: fixed1.9.1)
Attachments
(1 file, 1 obsolete file)
4.47 KB,
patch
|
Gavin
:
review+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8pre) Gecko/2009021904 GranParadiso/3.0.8pre ID:2009021904 When loading a Japanese Wikipedia page automatically translated to English by Google Translate, I get the following JS error: Error: browser is null Source file: chrome://browser/content/browser.js Line: 2583 It happes at the line: if (browser.engines) { In BrowserSearch::addEngine() Doesn't happen when viewing the Japanese page without tranlsation, or with translated Japanese Wikipedia pages other than this bug reports URL.
Comment 1•15 years ago
|
||
This happens because the page is in a frame, apparently. The search engine discovery code only looks for top-level documents (via getBrowserForDocument()).
Summary: "browser is null" in BrowserSearch::addEngine() in chrome://browser/content/browser.js → search engine discovery code doesn't properly handle frames ("browser is null" in BrowserSearch::addEngine)
Assignee | ||
Comment 2•15 years ago
|
||
The same issue also exists in the Feed handler, except that we've got a null check there with the comment // ??? this really shouldn't happen.. What to fix: Both handlers or getBrowserForDocument?
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → zeniko
OS: Linux → All
Hardware: x86 → All
Comment 3•15 years ago
|
||
If you plan on making discovery of feeds in frames work, I think that'll be the fourth change in our behavior for that without having ever made an explicit decision about how-and-whether (though on the upside, it would be the first *intentional* change) - there's a bug, possibly currently WFM, where Jesse and I had a desultory conversation about the implications.
Assignee | ||
Comment 4•15 years ago
|
||
(In reply to comment #3) That's bug 305472, thanks for the note. Considering the discussion in that bug, I'll stick to updating the comment.
Assignee | ||
Comment 5•15 years ago
|
||
Attachment #363406 -
Flags: review?(gavin.sharp)
Comment 6•15 years ago
|
||
Don't the arguments in bug 305472 comment 4 equally apply to search engines? Not sure why they should differ from feeds in this respect.
Assignee | ||
Comment 7•15 years ago
|
||
The main difference is that search engines are not as intimately tied to the address bar as the feed icon is.
Comment 8•15 years ago
|
||
What's that do for data:text/html,<iframe src="http://developer.mozilla.org/"></iframe> when you follow one of the external links to somewhere without a search engine? (And even if it does happen to do the right thing and remove the discovered engine, given our penchant for breaking that, a test would be a good thing). Do we support discovering multiple engines at once? What happens if the framing document (or even a frameset document) has a search engine and a framed document does too (or multiple framed documents do)? Whoever loads slowest wins?
Assignee | ||
Comment 9•15 years ago
|
||
Right, let's just fix the error, then. (In reply to comment #8) > What's that do for data:text/html,<iframe > src="http://developer.mozilla.org/"></iframe> when you follow one of the > external links to somewhere without a search engine? The wrong thing. :-( > Do we support discovering multiple engines at once? We do, as long as they've got different titles. > Whoever loads slowest wins? First come, first serve.
Attachment #363406 -
Attachment is obsolete: true
Attachment #363422 -
Flags: review?(gavin.sharp)
Attachment #363406 -
Flags: review?(gavin.sharp)
Comment 10•15 years ago
|
||
Comment on attachment 363422 [details] [diff] [review] fix error and add comments thanks!
Attachment #363422 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Comment 11•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/410bc15d198b
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.2a1
Assignee | ||
Updated•15 years ago
|
Attachment #363422 -
Flags: approval1.9.1?
Comment 12•15 years ago
|
||
Comment on attachment 363422 [details] [diff] [review] fix error and add comments a191=beltzner
Attachment #363422 -
Flags: approval1.9.1? → approval1.9.1+
Updated•15 years ago
|
Keywords: checkin-needed
Comment 13•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/76bf6f2083fa
Keywords: checkin-needed → fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•