Closed
Bug 631983
Opened 14 years ago
Closed 13 years ago
[tabmail] "Error: this.mCurrentBrowser is null" [tabbrowser.xml docShell property]
Categories
(SeaMonkey :: MailNews: Message Display, defect)
SeaMonkey
MailNews: Message Display
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: philip.chee, Assigned: neil)
Details
Attachments
(1 file)
1.39 KB,
patch
|
mnyromyr
:
review+
|
Details | Diff | Splinter Review |
Now that I've fixed the constructor and destructor in tabbrowser not to fall over when in tabmail, I'm seeing other errors like this:
Error: this.mCurrentBrowser is null
Source file: chrome://navigator/content/tabbrowser.xml
Comment 1•14 years ago
|
||
AFAICS it's the select handler (onxblselect), triggered when you select a folder:
<handler event="select" action="if (event.originalTarget == this.mPanelContainer) this.updateCurrentBrowser();"/>
I cannot tell where exactly it breaks because stupid Venkman only sees very few of tabbrowser.xml's methods for some reason and hangs if I do some Step Into's and Step Out's in succession starting from the above handler breakpoint. :-(
![]() |
Reporter | |
Comment 2•14 years ago
|
||
In Tabmail:
<xul:tabbox anonid="tabbox"
flex="1"
eventnode="document"
xbl:inherits="handleCtrlPageUpDown"
onselect="if (event.target.localName == 'tabs' &&
'updateCurrentTab' in this.parentNode)
this.parentNode.updateCurrentTab();">
If we move the onselect handler into the <handlers> section e.g.:
<handler event="select" action="if (event.originalTarget ==
this.tabContainer) this.updateCurrentTab();"/>
This should override the handler inherited from tabbrowser.
Comment 3•14 years ago
|
||
(In reply to comment #2)
> This should override the handler inherited from tabbrowser.
No, unfortunately onxblselect seems to trigger all associated select handlers on the inheritance chain (i.e. first the tabmail one if defined, then the tabbrowser one), and I found no way to cancel it (like event.preventDefault or event.stopPropagation). Actually I'd be interested if it's possible at all, because it might help with fixing bug 409792.
![]() |
Reporter | |
Comment 4•14 years ago
|
||
Untested suggestions:
1. In tabmail create a stub method "updateCurrentBrowser" that just points to updateCurrentTab.
2. Try <handler event="select" phase="capturing" .../>.
Comment 5•14 years ago
|
||
Thanks for those tips but I found I prematurely blamed the select handler. Since Venkman is completely useless for debugging XBL (unfortunately) I resorted to adding Components.utils.reportError statements until I found the real culprit:
<property name="docShell"
onget="return this.mCurrentBrowser.docShell"
readonly="true"/>
(tabbrowser.xml line 2608)
So this is in fact one of those "docShell is null" issues. And I fear that's above my head.
Updated•14 years ago
|
Summary: [tabmail] "Error: this.mCurrentBrowser is null" → [tabmail] "Error: this.mCurrentBrowser is null" [tabbrowser.xml docShell property]
Comment 6•14 years ago
|
||
See bug 638915 for another tabmail issue that I have been seeing for quite some time already (but only now cared to file).
Comment 7•13 years ago
|
||
(In reply to Jens Hatlak (:InvisibleSmiley) from comment #5)
> So this is in fact one of those "docShell is null" issues. And I fear that's
> above my head.
Neil/Karsten any chance we can narrow this down, I fear on this (it looks bad + it might be masking other problems)
![]() |
Reporter | |
Comment 8•13 years ago
|
||
> <property name="docShell"
> onget="return this.mCurrentBrowser.docShell"
> readonly="true"/>
Perhaps in tabmail.xml we should get the docshell from this.currentTabInfo.getBrowser().docshell instead.
Neil/Karsten?
Assignee | ||
Comment 9•13 years ago
|
||
Does anyone have any STR? (Just opening and closing the mail window isn't enough, although I did notice a strict warning from messagePaneOnResize for some reason.)
![]() |
Reporter | |
Comment 10•13 years ago
|
||
IIRC. Open a few tabs. Tab around. Close a few tabs.
Comment 11•13 years ago
|
||
Minimum STR:
1. start SM with fresh profile
2. open MailNews
3. create Blogs & News Feeds account
4. expand Blogs & News Feeds account (left pane)
5. select Trash folder under Blogs & News Feeds account (left pane)
Assignee | ||
Comment 12•13 years ago
|
||
OK, so I've traced it as far as a pagehide event, but I haven't worked out which JS object the event is being called on.
Assignee | ||
Comment 13•13 years ago
|
||
So, the pagehide event is being handled by browser.xml's onPageHide method.
It checks for !this.docShell || !this.fastFind which are properties.
fastFind looks for a tabbrowser and retrieves its fastFind property.
The tabbrowser hasn't created a fastFind yet, so it does so.
It tries to init it using its current docShell.
However it doesn't have one.
Thunderbird doesn't have a problem because it doesn't have a tabbrowser.
Assignee | ||
Comment 14•13 years ago
|
||
Don't confuse people into thinking we're a tabbrowser when we're not.
Comment 15•13 years ago
|
||
Comment on attachment 566172 [details] [diff] [review]
Proposed patch
So, this patch works, because browserBindings.getTabBrowser tries to find an enclosing tabbrowser by walking up the DOM tree, which will fail only then.
(The assumptions getTabBrowser makes are a bit overly optimistic, imo, but that's toolkit for you …)
Attachment #566172 -
Flags: review?(mnyromyr) → review+
Assignee | ||
Comment 16•13 years ago
|
||
Pushed changeset 820f6ebfe077 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•