Closed
Bug 554558
Opened 15 years ago
Closed 15 years ago
gFolderTreeView.load fails if the mode is not provided by TB
Categories
(Thunderbird :: Folder and Message Lists, defect)
Thunderbird
Folder and Message Lists
Tracking
(thunderbird3.1 rc1-fixed)
RESOLVED
FIXED
Thunderbird 3.1b2
Tracking | Status | |
---|---|---|
thunderbird3.1 | --- | rc1-fixed |
People
(Reporter: jcranmer, Assigned: rain1)
References
Details
Attachments
(2 files)
17.41 KB,
patch
|
asuth
:
review+
|
Details | Diff | Splinter Review |
904 bytes,
patch
|
asuth
:
review+
asuth
:
approval-thunderbird3.1+
|
Details | Diff | Splinter Review |
So, when making my foldercat extension, I noticed that gFolderTreeView.load has a bug in it:
if (this._mode in this._modeDisplayNames)
string = this._modeDisplayNames[this._mode];
else {
let key = "folderPaneModeHeader_" + aMode;
string = document.getElementById("bundle_messenger").getString(key);
}
When this runs, this._mode happens to be null, so the first if statement is not executed. It then tries to load the string from the message bundle which happens to fail at runtime.
Instead, the first line should be this.mode, which will properly load this._mode if it is not set.
Assignee | ||
Comment 1•15 years ago
|
||
Does this work on trunk? I'd be surprised if it does... or something could possibly be initializing this._mode on trunk before load. Either way it's definitely a bug.
Reporter | ||
Comment 2•15 years ago
|
||
It most definitely exists on recent nightlies, and I think it exists on 3.0 branch, but I'm not entirely sure.
Version: 3.0 → Trunk
Assignee | ||
Comment 3•15 years ago
|
||
This is layered on top of the patch in bug 542165.
Updated•15 years ago
|
Attachment #434626 -
Flags: review?(bugmail) → review+
Comment 4•15 years ago
|
||
Comment on attachment 434626 [details] [diff] [review]
patch + test
Muy excelente.
Assignee | ||
Comment 5•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1b2
Reporter | ||
Comment 6•15 years ago
|
||
So, testing this out with my extension indicates it's not quite fully fixed. The current line is:
if (this.mode in this._modeDisplayNames)
string = this._modeDisplayNames;
If you load up an extension as the default, you'll find that this causes the string to become "[object Object]".
The correct line should be:
if (this.mode in this._modeDisplayNames)
string = this._modeDisplayNames[this.mode];
Reporter | ||
Comment 7•15 years ago
|
||
Attachment #443856 -
Flags: review?
Reporter | ||
Updated•15 years ago
|
Attachment #443856 -
Flags: review? → review?(bugmail)
Comment 8•15 years ago
|
||
Comment on attachment 443856 [details] [diff] [review]
Fix the name issue
Given the simplicity of the fix, this should go in 3.1 for sure.
Attachment #443856 -
Flags: review?(bugmail)
Attachment #443856 -
Flags: review+
Attachment #443856 -
Flags: approval-thunderbird3.1+
Reporter | ||
Comment 9•15 years ago
|
||
(In reply to comment #7)
> Created an attachment (id=443856) [details]
> Fix the name issue
Checked into comm-central as changeset 5587:46de9c4360e5.
Reporter | ||
Comment 10•15 years ago
|
||
Checked into comm-1.9.2 as changeset 5583:cd279d6b4fde.
status-thunderbird3.1:
--- → rc1-fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•