Open Bug 638915 Opened 14 years ago Updated 10 years ago

[tabmail] "Error: this.browsers[i] is undefined" when loading a feed message in the message pane [tabbrowser.xml onLinkAdded method]

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: InvisibleSmiley, Unassigned)

Details

When loading a feed message (e.g. from the Planet Mozilla RSS) in the message pane, the following appears in the Error Console: Error: this.browsers[i] is undefined Source File: chrome://navigator/content/tabbrowser.xml Line: 1179 This is in method onLinkAdded, inside a for loop, so this.browsers[i] exists (for i=0), but it is void, so accessing this.browsers[i].contentDocument fails. Either browsers[i] needs to be checked right there or the root cause be identified and fixed. I can do the former, but not the latter. There are more methods like this that could break in a similar way, e.g. getBrowserIndexForDocument and getBrowserForDocument.
Summary: "this.browsers[i] is undefined" when loading a feed message in the message pane → [tabmail] "Error: this.browsers[i] is undefined" when loading a feed message in the message pane [tabbrowser.xml onLinkAdded method]
In tabbrowser.xml we have: <property name="browsers" readonly="true"> <getter> <![CDATA[ return this._browsers || (this._browsers = Array.map(this.tabs, function (tab) tab.linkedBrowser)); ]]> </getter> </property> Looking at tabmail.xml perhaps we should implement a "browsers" property based on tabmail.getBrowserForSelectedTab() q.v. <!-- getBrowserForSelectedTab is required as some toolkit functions require a getBrowser() function. --> <method name="getBrowserForSelectedTab"> <body> <![CDATA[ if (!this.currentTabInfo) this.currentTabInfo = this.tabInfo[0]; let tabInfo = this.currentTabInfo; let browserFunc = tabInfo.mode.getBrowser || tabInfo.mode.tabType.getBrowser; if (!browserFunc) return null; return browserFunc.call(tabInfo.mode.tabType, tabInfo); ]]> </body> </method>
I get the following: ++DOMWINDOW == 120 (0x7f2c39b47600) [pid = 18632] [serial = 278] [outer = 0x7f2c5b023780] [18632] WARNING: Failed to retarget HTML data delivery to the parser thread.: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/parser/html/nsHtml5StreamParser.cpp, line 952 [18632] WARNING: GetDefaultCharsetForLocale: need to add multi locale support: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/intl/locale/unix/nsUNIXCharset.cpp, line 101 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: We should have hit the document element...: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/layout/xul/BoxObject.cpp, line 183 JavaScript error: chrome://navigator/content/tabbrowser.xml, line 331: TypeError: browsers[i] is undefined
You need to log in before you can comment on or make changes to this bug.