Open
Bug 228534
Opened 21 years ago
Updated 16 years ago
Update or resolve XXX in isPreferred
Categories
(SeaMonkey :: UI Design, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: timeless, Unassigned)
Details
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031208
Bug 202817 added:
isPreferred: function(contentType, desiredContentType)
{
try {
var catMgr = Components.classes["@mozilla.org/categorymanager;1"]
.getService(Components.interfaces.nsICategoryManager);
var entry = catMgr.getCategoryEntry("Gecko-Content-Viewers",
contentType);
if (entry) {
return true;
}
return false;
} catch (e) {
// XXX propagate failures other than "NS_ERROR_NOT_AVAILABLE"?
// This seems to never get called, so not like it matters....
return false;
}
Exception ``[Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsICategoryManager.getCategoryEntry]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
chrome://navigator/content/nsBrowserContentListener.js :: anonymous :: line 137"
data: no]'' thrown from function
anonymous(contentType=string:"multipart/x-mixed-replace",
desiredContentType=Object:{0}) in
<chrome://navigator/content/nsBrowserContentListener.js> line 137.
I'm not quite sure how i hit this, but about the only thing i visit is bugzilla
query pages, and they use that mime type :).
At the very least the two return falses can be consolidated as a single return
false after the try{}catch(e){}/*here*/
Comment 1•21 years ago
|
||
If I understand the hookups here correctly, this code is only called for the
toplevel XUL window load... but I'm not sure I understand the hookups correctly.
Comment 2•21 years ago
|
||
I don't see the point of this file at all.
It actually hooks into the URI loader, rather than the doc shell.
See
http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/nsBrowserContentListener.js#163
and
http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/nsBrowserContentListener.js#86
Comment 3•21 years ago
|
||
well, this tells the uri loader that there's a window that can handle content, no?
anyway, I'd say this function should just return false if it can't get the
category manager. which seems to be the only reason this can fail (except
NOT_AVAILABLE, which means no category entry found, which should return false)
is nsBrowserContentListener only used on uriloader, or is it also docshell's
content listener?
Comment 4•21 years ago
|
||
Comment 5•21 years ago
|
||
Actually, only a URI content listener... see the first of my comment 2 links.
I tried commenting out the code in navigator.js and so far have not seen any
regressions... biesi suggested I try -remote which as far as I can tell still
works; can anyone suggest other tests?
Comment 6•21 years ago
|
||
Do we have cases where a new load is targeted at an existing chrome window?
That would probably exercise this code....
In general, though, most of this code is probably never called; isPreferred may
be the one exception.
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
Comment 7•17 years ago
|
||
Filter "spam" on "guifeatures-nobody-20080610".
Assignee: guifeatures → nobody
QA Contact: guifeatures
You need to log in
before you can comment on or make changes to this bug.
Description
•