Closed Bug 102517 Opened 23 years ago Closed 22 years ago

javascript strict warnings in mail-offline.js

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: sspitzer)

References

Details

Attachments

(1 file, 3 obsolete files)

Just starting mailnews with a clean profile produces:

Warning: function PromptSendMessages does not always return a value
Source File: chrome://messenger/content/mail-offline.js
Line: 140
Source Code:
}

Warning: function PromptDownloadMessages does not always return a value
Source File: chrome://messenger/content/mail-offline.js
Line: 186
Source Code:
}

Warning: function MailCheckBeforeOfflineChange does not always return a value
Source File: chrome://messenger/content/mail-offline.js
Line: 271
Source Code:
}

Build 20011001
QA Contact: esther → stephend
yes, I got it.  cleaning up the code, fix in hand.
Status: NEW → ASSIGNED
Attached patch clean up. (obsolete) — Splinter Review
whoops, new patch coming.  checkfunc needs to return a value, to prevent us 
from going off line if the user doesn't want to.
Anything new on this?  I was about to create a patch, but I figured I'd better
check Bugzilla first.  Last comment was two months ago.
*** Bug 83525 has been marked as a duplicate of this bug. ***
Comment on attachment 52271 [details] [diff] [review]
clean up.

obsolete. is there a new patch underway?
Attachment #52271 - Attachment is obsolete: true
Attached patch proposed patch (obsolete) — Splinter Review
this patch fixes it in my tree...
Um.... that patch looks odd.  That makes the function _always_ return false,
effectively.  That seems wrong, given the comment at the start of the function.

In fact, it looks like the final return should be |return true;|, from a brief
skim of the code.
Attached patch patch v2 (obsolete) — Splinter Review
This is the alternative... I will try both to see if they make any difference

either may work, or both may.
a third alternative is to remove the "false" from the other returns, but that
may not work, if the comment is to be believed :) will investigate further.
Attachment #80393 - Attachment is obsolete: true
Comment on attachment 80393 [details] [diff] [review]
proposed patch

the other bug was the way to go.
I found this out by stepping thru the code in my head, and a little help from
bz
thinko; s/bug/patch/ sorry for the spam
your patch looks wrong, you should really |return true| as I'll do in the patch
I'll attach in a second
Attached patch patch v3Splinter Review
Attachment #80394 - Attachment is obsolete: true
Comment on attachment 81661 [details] [diff] [review]
patch v3

I actually made this change locally, but forgot to attach a new diff :P

r=morten@nilsen.com
Attachment #81661 - Flags: review+
Comment on attachment 81661 [details] [diff] [review]
patch v3

sr=alecf
Attachment #81661 - Flags: superreview+
checked in
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
I love strict warning fixes.  But I don't like when they break functionality. 
This last checkin on the latest patch caused regression bug 143708.  Please make
sure you test what you're fixing in strict warning patches.
Verified FIXED with the latest trunk self-build on Windows 2000 with JS strict
warnings enabled.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: