Closed Bug 128905 Opened 23 years ago Closed 23 years ago

nsIPromptService.idl confirmEx is poorly prototyped

Categories

(Core Graveyard :: Embedding: APIs, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: timeless, Assigned: timeless)

References

Details

(Whiteboard: mailreviewtest)

Attachments

(2 files, 1 obsolete file)

77 boolean confirm(in nsIDOMWindow parent, 78 in wstring dialogTitle, 79 in wstring text); 135 void confirmEx(in nsIDOMWindow parent, 136 in wstring dialogTitle, 137 in wstring text, 138 in unsigned long buttonFlags, 139 in wstring button0Title, 140 in wstring button1Title, 141 in wstring button2Title, 142 in wstring checkMsg, 143 inout boolean checkValue, 144 out PRInt32 buttonPressed); confirmEx should not be void, it should be PRInt32, and buttonPressed should just be the return value. In converting the idl to js I managed to flub this which of course resulted in my code not working when i tried to call the xpcom impl using 9 args and expecting buttonPressed as a retval.
Yeah, that is pretty awkward.
Blocks: 99615
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Attached patch draft (obsolete) — Splinter Review
This should be a clean patch of just the relevant bits. unfortunately the biggest code holder is mailnews. i think (as usual) some of the mailnews code was just incorrect. and i've sprinkled a few /**/'s in places where i can imagine the jseng will eventually warn about not always returning a value. I won't check those lines in, but I would like opinions about what to do. Note that the C++ consumers and impl's don't notice this change at all...
Moving Netscape owned 0.9.9 and 1.0 bugs that don't have an nsbeta1, nsbeta1+, topembed, topembed+, Mozilla0.9.9+ or Mozilla1.0+ keyword. Please send any questions or feedback about this to adt@netscape.com. You can search for "Moving bugs not scheduled for a project" to quickly delete this bugmail.
Target Milestone: mozilla1.0 → mozilla1.2
this bug was only assigned to conrad as a courtesy.
Assignee: ccarlen → timeless
Status: ASSIGNED → NEW
Keywords: mozilla1.0
Target Milestone: mozilla1.2 → mozilla1.0
I like it. The only problem I found is this one: =================================================================== RCS file: /cvsroot/mozilla/mailnews/base/resources/content/mail-offline.js,v retrieving revision 1.6 diff -u -r1.6 mail-offline.js --- mailnews/base/resources/content/mail-offline.js 2002/02/19 22:39:33 1.6 +++ mailnews/base/resources/content/mail-offline.js 2002/03/04 22:40:09 @@ -97,9 +97,8 @@ InitServices(); if (gPromptService) { - var buttonPressed = {value:0}; var checkValue = {value:true}; - gPromptService.confirmEx(window, + buttonPressed = gPromptService.confirmEx(window, You dropped the decl of "buttonPressed" As far as the warnings about not returning values, fix the ones that are obvious (safe) to fix, leave the others commented, but file bugs. In my experience, those helpful comments get ignored and stay there forever unless bugs are filed. Also, since with js there is no compiler to check prototypes, make sure you've actually tested each of these confirms. with that, r=ccarlen
i picked false i changed (x*a+x*b+x*c) to x*(a+b+c) i removed function calling convention comments because they were confusing me. Anyone who wants to know the function parameters should be able to read the idl. very little changed, but I can provide a -w if someone wants it...
Attachment #72484 - Attachment is obsolete: true
Comment on attachment 77677 [details] [diff] [review] address comments + resolve conflicts sr=scc
Attachment #77677 - Flags: superreview+
Comment on attachment 77677 [details] [diff] [review] address comments + resolve conflicts a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #77677 - Flags: approval+
ok something messed up, I know that i made the changes to the other files in cvs, but for some reason they didn't end up in my patch or the updated patch. for reference bug 135672 has the changes to ComposerCommands.js editor.js and msgCompSMIMEOverlay.js
Comment on attachment 77892 [details] [diff] [review] browser.xml, nsIPromptTest.txt r=brade
Attachment #77892 - Flags: review+
Comment on attachment 77892 [details] [diff] [review] browser.xml, nsIPromptTest.txt sr=kin@netscape.com
Attachment #77892 - Flags: superreview+
Whiteboard: mailreviewtest
are these two patches up to date? I'm sure there have been changes since 4/5/2002. Can you provide an up to date patch? I'd like to review the mailnews changes. Also, can you let me know what you tested?
this was fixed around then
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Over to depstein for verification
QA Contact: mdunn → depstein
Mozilla 1.2b Gecko/20021008. ConfirmEx() now returns PRInt32 in nsIPromptService and nsIPrompt. Verified patch checkins against trunk build; looks good.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: