Closed Bug 1175513 Opened 5 years ago Closed 5 years ago

Cleanup nsXPCWrappedJSClass::CallMethod a bit.

Categories

(Core :: XPConnect, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(3 files)

No description provided.
Attachment #8623662 - Flags: review?(bobbyholley) → review+
Comment on attachment 8623663 [details] [diff] [review]
Factor out nsXPCWrappedJSClass::CleanupOutparams

Review of attachment 8623663 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/xpconnect/src/XPCWrappedJSClass.cpp
@@ +727,5 @@
> +        void* p;
> +        if (!(p = nativeParams[i].val.p))
> +            continue;
> +
> +        if (!inOutOnly || param.IsIn()) {

Is there actually a reason for the difference in behavior with inOutOnly? I'm fine to keep it, but please comment as to the reason why we need it, or that it's cargo cult.

@@ +1194,5 @@
>      readyToDoTheCall = true;
>  
>  pre_call_clean_up:
>      // clean up any 'out' params handed in
> +    CleanupOutparams(cx, methodIndex, info, nativeParams, true, paramCount);

Can you add |/* inOutOnly = */|, here and below?
Attachment #8623663 - Flags: review?(bobbyholley) → review+
Attachment #8623674 - Flags: review?(bobbyholley) → review+
You need to log in before you can comment on or make changes to this bug.