Closed
Bug 413783
Opened 17 years ago
Closed 17 years ago
Params are not cleared for every call but instead are appended
Categories
(Core :: js-ctypes, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: om.brahmana, Assigned: om.brahmana)
Details
Attachments
(1 file)
3.55 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
nsNativeMethod::Call() the parameter values are continuously appended which results in same behavior for multiple calls with different values.
Assignee | ||
Comment 1•17 years ago
|
||
Made the changes and it works absolutely fine for me. (On Windows)
Attachment #298863 -
Flags: review?(mark.finkle)
Comment 2•17 years ago
|
||
Comment on attachment 298863 [details] [diff] [review]
patch v0.1
>Index: nsNativeMethod.cpp
>-NS_IMETHODIMP nsNativeMethod::Execute(JSContext* aContext, jsval* aValue)
>+NS_IMETHODIMP nsNativeMethod::Execute(JSContext* aContext, jsval* aValue, nsCOMArray<nsIVariant> aValues)
use nsCOMArray<nsIVariant> &aValues
so we don't copy the array
>
>+ nsCOMArray<nsIVariant> paramValues;
> for (PRUint32 i=0; i<argc; i++) {
> nsCOMPtr<nsIVariant> varValue;
> GET_ARG(varValue, argv[i]);
>- mValues.AppendObject(varValue);
>+ paramValues.AppendObject(varValue);
> }
>
> #undef GET_ARG
>
>- rv = Execute(cx, vp);
>+ rv = Execute(cx, vp, paramValues);
>
> *_retval = PR_TRUE;
>
paramValues -> values
>Index: nsNativeMethod.h
>- NS_IMETHOD Execute(JSContext* aContext, jsval* aValue);
>+ NS_IMETHOD Execute(JSContext* aContext, jsval* aValue, nsCOMArray<nsIVariant> aValues);
use here too: nsCOMArray<nsIVariant> &aValues
good job. r=mfinkle
I can land this.
Attachment #298863 -
Flags: review?(mark.finkle) → review+
Comment 3•17 years ago
|
||
landed
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Product: Other Applications → Core
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•