Open Bug 228534 Opened 21 years ago Updated 16 years ago

Update or resolve XXX in isPreferred

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

(Not tracked)

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*/
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.
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?
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?
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.
Product: Core → Mozilla Application Suite
Filter "spam" on "guifeatures-nobody-20080610".
Assignee: guifeatures → nobody
QA Contact: guifeatures
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.