Closed Bug 432608 Opened 17 years ago Closed 16 years ago

Don't use window.alert() from chrome code in mailnews/

Categories

(Thunderbird :: Account Manager, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b1

People

(Reporter: rod.whiteley, Assigned: philor)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008050703 Thunderbird/3.0a1pre In some warning messages, the title bar now says "[JavaScript Application]". This seems to imply that the warning message is not from Thunderbird. Reproducible: Always Steps to Reproduce: For an example: 1. Choose: File - New - Account... 2. Press the Next button twice. In Thunderbird 2 the title was "Alert", which was harmless. Arguably, Thunderbird's code should always use the prompt service and never call window.alert at all. See also bug 171129 (though that was for code in content pages).
OS: Windows XP → All
Hardware: PC → All
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Thanks to our tangled web of shared and forked code, not actually a duplicate: I fixed the ones in mail/ that only affected Tbird, but account manager/wizard is shared, as are several other things that window.alert(). Of course, thanks to our tangled web of products and components, there's no place to put a bug for shared frontend code, but account manager's the biggest offender, so I'll blame it for everything :) And there's no arguably should use the prompt service about it: window.alert() doesn't offer any API to set a different title, because you aren't supposed to be using it.
Assignee: nobody → philringnalda
Status: RESOLVED → REOPENED
Component: Mail Window Front End → Account Manager
QA Contact: front-end → account-manager
Resolution: DUPLICATE → ---
Summary: Some warnings have the title "[JavaScript Application]" → Don't use window.alert() from chrome code in mailnews/
Version: unspecified → Trunk
Status: REOPENED → ASSIGNED
Attached patch Fix v.1 (deleted) — Splinter Review
Make the bad things go away.
Attachment #342030 - Flags: superreview?(neil)
Attachment #342030 - Flags: review?(neil)
Attachment #342030 - Flags: superreview?(neil)
Attachment #342030 - Flags: superreview+
Attachment #342030 - Flags: review?(neil)
Attachment #342030 - Flags: review+
Comment on attachment 342030 [details] [diff] [review] Fix v.1 > var promptService = >- Components.classes["@mozilla.org/embedcomp/prompt-service;1"]. >- getService(Components.interfaces.nsIPromptService); Had it not been for this existing example I would have suggested the omission of the temporary variable. >+ promptService.alert(window, null, However I do suggest the omission of the trailing space ;-)
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: