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)
Thunderbird
Account Manager
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b1
People
(Reporter: rod.whiteley, Assigned: philor)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
neil
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
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).
Updated•17 years ago
|
OS: Windows XP → All
Hardware: PC → All
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 2•16 years ago
|
||
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
Assignee | ||
Updated•16 years ago
|
Status: REOPENED → ASSIGNED
Assignee | ||
Comment 3•16 years ago
|
||
Make the bad things go away.
Attachment #342030 -
Flags: superreview?(neil)
Attachment #342030 -
Flags: review?(neil)
Updated•16 years ago
|
Attachment #342030 -
Flags: superreview?(neil)
Attachment #342030 -
Flags: superreview+
Attachment #342030 -
Flags: review?(neil)
Attachment #342030 -
Flags: review+
Comment 4•16 years ago
|
||
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 ;-)
Assignee | ||
Comment 5•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago → 16 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.
Description
•