Closed Bug 270342 Opened 20 years ago Closed 20 years ago

In <threadPane.js>, "Warning: function MsgSortThreadPane does not always return a value" and "Warning: function MsgToggleThreaded does not always return a value"

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha6

People

(Reporter: sgautherie, Assigned: sgautherie)

Details

Attachments

(1 file, 2 obsolete files)

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a5) Gecko/20041116] (nightly) (W98SE)

{{
Warning: function MsgSortThreadPane does not always return a value
Source File: chrome://messenger/content/threadPane.js
Line: 303
Source Code:
}

Warning: function MsgToggleThreaded does not always return a value
Source File: chrome://messenger/content/threadPane.js
Line: 331
Source Code:
}
}}

Steps:
1. Open MailNews.
Target Milestone: --- → mozilla1.8alpha5
Attached patch (Av1) <threadPane.js> (obsolete) — Splinter Review
Assignee: sspitzer → gautheri
Status: NEW → ASSIGNED
Attachment #166201 - Flags: superreview?(bienvenu)
Attachment #166201 - Flags: review?(bienvenu)
'blocking1.8a5=?': no big deal, but so easy to fix... (with proposed patch)
Flags: blocking1.8a5?
Flags: blocking1.8a5? → blocking1.8a5-
Product: Browser → Seamonkey
Target Milestone: mozilla1.8alpha5 → mozilla1.8alpha6
Comment on attachment 166201 [details] [diff] [review]
(Av1) <threadPane.js>

>     if (viewFlags & nsMsgViewFlagsType.kGroupBySort)
>     {
>       viewDebug("switching view to all msgs\n");
>-      return SwitchView("cmd_viewAllMsgs");
>+      SwitchView("cmd_viewAllMsgs");
>     }
> 
>-
>     dbview.sort(dbview.sortType, dbview.sortOrder);
>     UpdateSortIndicators(dbview.sortType, dbview.sortOrder);
> }
These changes won't work. The idea is not to do anything after switching the
view. You could do this in at least two ways; one way would be to readd the
return but on its own line; the second way would be to wrap the following lines
in an else block.
Attachment #166201 - Flags: superreview?(bienvenu)
Attachment #166201 - Flags: review?(bienvenu)
Attachment #166201 - Flags: review-
Attachment #166201 - Attachment is obsolete: true
Attached patch (Av2) <threadPane.js> (obsolete) — Splinter Review
Av1, with comment 3 suggestion(s).
Attachment #168058 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 168058 [details] [diff] [review]
(Av2) <threadPane.js>

>   var viewFlags = dbview.viewFlags;
>-  dbview.viewFlags &= ~ nsMsgViewFlagsType.kGroupBySort;
>   if (viewFlags & nsMsgViewFlagsType.kGroupBySort)
>   {
>+    dbview.viewFlags &= ~ nsMsgViewFlagsType.kGroupBySort;
That's an interesting optimization but now viewFlags is only used once
immediately after calculating it which is a waste, you could just use
dbview.viewFlags directly. Nit: you don't need to add a space after each ~
symbol.
Attachment #168058 - Attachment is obsolete: true
Attachment #168058 - Flags: review?(neil.parkwaycc.co.uk)
Av2, with comment 5 suggestion(s).
Attachment #168078 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #168078 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #168078 - Flags: superreview?(bienvenu)
Attachment #168078 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 168078 [details] [diff] [review]
(Av2b) <threadPane.js>
[Checked in: Comment 7]


Check in: { 2004-12-07 15:51	neil%parkwaycc.co.uk	mozilla/ mailnews/
base/ resources/ content/ threadPane.js      1.79 }
Attachment #168078 - Attachment description: (Av2b) <threadPane.js> → (Av2b) <threadPane.js> [Checked in: Comment 7]
Attachment #168078 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment on attachment 168078 [details] [diff] [review]
(Av2b) <threadPane.js>
[Checked in: Comment 7]

[Mozilla Thunderbird, version 1.0.1 (20050309)] (nightly) (W98SE)

Unexpectedly, this is welcomed on TB branch too...
Attachment #168078 - Flags: approval-aviary1.0.1?
Attachment #168078 - Flags: approval-aviary1.0.1? → approval-aviary1.0.1-
Attachment #168078 - Attachment is obsolete: false
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: