Closed Bug 882901 Opened 11 years ago Closed 11 years ago

Error: "ReferenceError: tabContainer is not defined" in chrome://messenger/content/tabmail.xml

Categories

(Thunderbird :: Toolbars and Tabs, defect)

24 Branch
defect
Not set
normal

Tracking

(thunderbird25 fixed, thunderbird26 fixed, thunderbird_esr2425+ fixed)

RESOLVED FIXED
Thunderbird 27.0
Tracking Status
thunderbird25 --- fixed
thunderbird26 --- fixed
thunderbird_esr24 25+ fixed

People

(Reporter: ssitter, Assigned: aceman)

References

Details

Attachments

(1 file, 1 obsolete file)

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0a1
BuildID: 20130612030727

I get the following error when closing a tab:

  Error: ReferenceError: tabContainer is not defined
  Source file: chrome://messenger/content/tabmail.xml
  Line: 2599

It seems this error is triggered or maybe just reported after I installed the Console² extension from https://addons.mozilla.org/thunderbird/addon/1815 in a fresh profile.
Attached patch 882901.patch (obsolete) — Splinter Review
This seems to be caused by bug 868969, where tabBrowser was changed to tabContainer without actually defining tabContainer as tabBrowser.tabContainer. At least that is the state in the current code. This seems to fix it. However I don't know what problem the error caused (if any) so can't test if the problem is gone now. But the error in the console is gone. The patch also fixes a "functions should only be defined on top level" warning.

Suyash, as you seem to be seeing the error message too, please check if the patch removes it.

The steps to reproduce this are just to open a new tab in TB (e.g. message in a tab) and then close it. No addons required (safe mode produces the error too).
Assignee: nobody → acelists
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #806860 - Flags: feedback?(syshagarwal)
Attachment #806860 - Flags: feedback?(ssitter)
CCing guys involved in bug 868969 to check if the theory is correct.
Blocks: 868969
OS: Windows 7 → All
Hardware: x86_64 → All
Comment on attachment 806860 [details] [diff] [review]
882901.patch

Awesome, yes I can confirm the error is gone now :)
Attachment #806860 - Flags: feedback?(syshagarwal) → feedback+
Comment on attachment 806860 [details] [diff] [review]
882901.patch

Review of attachment 806860 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #806860 - Flags: review?(mconley)
Comment on attachment 806860 [details] [diff] [review]
882901.patch

Review of attachment 806860 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/base/content/tabmail.xml
@@ +2558,5 @@
>      <handlers>
>        <handler event="click" button="0"><![CDATA[
> +        let bindingParent = document.getBindingParent(this);
> +        if (!bindingParent)
> +          return;

should fix the indention of the block below
Yeah, I intentionally didn't reindent the whole block as it would make the changes invisible and would be churn that is normally unwanted. But if the reviewer insists on it I have no problem to do it.
In such cases it's often useful to fix it, but also submit an additional diff with whitespace changes ignored for review.
Comment on attachment 806860 [details] [diff] [review]
882901.patch

Review of attachment 806860 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good! Thanks aceman.
Attachment #806860 - Flags: review?(mconley) → review+
mconley, should I now do the reindenting patch?
Flags: needinfo?(mconley)
Yes - I should have been more clear: my r+ is conditional upon the fixes that Magnus asked for.
Flags: needinfo?(mconley)
Attached patch 882901.patch v2Splinter Review
OK, thanks.
Attachment #806860 - Attachment is obsolete: true
Attachment #806860 - Flags: feedback?(ssitter)
Attachment #813601 - Flags: review+
https://hg.mozilla.org/comm-central/rev/05ea0effa0a3
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 27.0
Comment on attachment 813601 [details] [diff] [review]
882901.patch v2

[Approval Request Comment]
Regression caused by (bug #): bug 868969
User impact if declined: unknown
Testing completed (on c-c, etc.): c-c nightly
Risk to taking this patch (and alternatives if risky): unknown

This seems to work fine. We do not know what problem may be caused by having this error in the code. We hope the patch fixes that unknown problem. Even if it causes no problems, showing an exception at each closing of a tab is probably not something we want to expose users to in the stable TB24.
Attachment #813601 - Flags: approval-comm-esr24?
Comment on attachment 813601 [details] [diff] [review]
882901.patch v2

[Triage Comment]
Needs landing on aurora/beta first, a=me for that.
Attachment #813601 - Flags: approval-comm-beta+
Attachment #813601 - Flags: approval-comm-aurora+
Attachment #813601 - Flags: approval-comm-esr24? → approval-comm-esr24+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: