Events are fired with their parameters in the reverse order. The mistake crept in during checkin of bug 178542. http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=XPConnect.cpp&root=/cvsroot&subdir=mozilla/embedding/browser/activex/src/plugin&command=DIFF_FRAMESET&rev1=1.17&rev2=1.18 Patch follows to correct the issue
Created attachment 115015 [details] [diff] [review] Patch Simple patch grabs disp args in reverse order. Proper ordering got lost in the churn of the event sink rewrite. The old version got it right, the new one didn't.
Where are actual arguments being reversed? /be
In code like this: <script for="someObject" event="FSCommand(command, args)"> </script> Instead of (command, args) it is sent as (args, command) because the plugin code that processes the args from the control is not putting them in the right order. The reason is that IDispatch::Invoke sends its arguments in an array with the args in reverse order, e.g. pDispParams->rgvarg = arg3; pDispParams->rgvarg = arg2; pDispParams->rgvarg = arg1; The plugin used to have some code to put them in the proper order, but unfortunately it was overlooked during a big code merge. This small patch reinstates the correct behaviour.
Comment on attachment 115015 [details] [diff] [review] Patch r=dbradley
Attachment #115015 - Flags: review+
Comment on attachment 115015 [details] [diff] [review] Patch Brendan, can you give this an sr? Thanks
Attachment #115015 - Flags: superreview?(brendan)
Comment on attachment 115015 [details] [diff] [review] Patch I was thrown by the comment, cuz it seemed to leave open the possibility that the bizarre reason was not by design of IDispatch. Maybe clarify it to say "arguments are listed backwards, intentionally, in rgvarg." email@example.com in any event. /be
Attachment #115015 - Flags: superreview?(brendan) → superreview+
Thanks, I'll change the comment at checkin
Comment on attachment 115015 [details] [diff] [review] Patch Requesting 1.3 apporval. ActiveX specific, low risk, obvious fix for regression.
Attachment #115015 - Flags: approval1.3?
Comment on attachment 115015 [details] [diff] [review] Patch a=asa (on behalf of drivers) for checkin to 1.3
Attachment #115015 - Flags: approval1.3? → approval1.3+
Fix is checked in
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
[AxPlugin] -> Ashish
QA Contact: carosendahl → ashishbhatt
Verified on 2003-02-21
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.