Closed
Bug 128905
Opened 23 years ago
Closed 23 years ago
nsIPromptService.idl confirmEx is poorly prototyped
Categories
(Core Graveyard :: Embedding: APIs, defect)
Core Graveyard
Embedding: APIs
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: timeless, Assigned: timeless)
References
Details
(Whiteboard: mailreviewtest)
Attachments
(2 files, 1 obsolete file)
26.87 KB,
patch
|
scc
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
2.98 KB,
patch
|
Brade
:
review+
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
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.
Comment 1•23 years ago
|
||
Yeah, that is pretty awkward.
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...
Comment 3•23 years ago
|
||
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
Comment 5•23 years ago
|
||
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 7•23 years ago
|
||
Comment on attachment 77677 [details] [diff] [review]
address comments + resolve conflicts
sr=scc
Attachment #77677 -
Flags: superreview+
Comment 8•23 years ago
|
||
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 10•23 years ago
|
||
Comment on attachment 77892 [details] [diff] [review]
browser.xml, nsIPromptTest.txt
r=brade
Attachment #77892 -
Flags: review+
Comment 11•23 years ago
|
||
Comment on attachment 77892 [details] [diff] [review]
browser.xml, nsIPromptTest.txt
sr=kin@netscape.com
Attachment #77892 -
Flags: superreview+
Updated•23 years ago
|
Whiteboard: mailreviewtest
Comment 12•23 years ago
|
||
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?
Assignee | ||
Comment 13•23 years ago
|
||
this was fixed around then
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 15•22 years ago
|
||
Mozilla 1.2b Gecko/20021008. ConfirmEx() now returns PRInt32 in nsIPromptService
and nsIPrompt. Verified patch checkins against trunk build; looks good.
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•