Don't auto-unwrap scripted direct proxies when calling non-generic functions

RESOLVED DUPLICATE of bug 1111243

Status

()

defect
RESOLVED DUPLICATE of bug 1111243
5 years ago
a year ago

People

(Reporter: till, Assigned: till)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
As discussed on IRC, we don't want to auto-unwrap scripted proxies when calling non-generic methods. We already don't do this for scripted indirect proxies, and this patch does the same for direct ones.
(Assignee)

Updated

5 years ago
Blocks: 1021379
(Assignee)

Comment 2

5 years ago
Oh, and try-servering here just in case we have code somewhere that relies on this: https://tbpl.mozilla.org/?tree=Try&rev=a7987ee85bbe
(Assignee)

Comment 3

5 years ago
Comment on attachment 8453161 [details] [diff] [review]
Don't auto-unwrap scripted direct proxies when calling non-generic functions

Switching reviewer: efaust offered on IRC and has the shorter review queue.
Attachment #8453161 - Flags: review?(jorendorff) → review?(efaustbmo)
Comment on attachment 8453161 [details] [diff] [review]
Don't auto-unwrap scripted direct proxies when calling non-generic functions

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

Looks good. r=me

::: js/src/jsproxy.cpp
@@ +1096,5 @@
>      /* Spidermonkey extensions. */
>      virtual bool call(JSContext *cx, HandleObject proxy, const CallArgs &args) const MOZ_OVERRIDE;
>      virtual bool construct(JSContext *cx, HandleObject proxy, const CallArgs &args) const MOZ_OVERRIDE;
> +    virtual bool nativeCall(JSContext *cx, IsAcceptableThis test, NativeImpl impl,
> +                            CallArgs args) const MOZ_OVERRIDE;

Just put the call to BaseProxyHandler::native call inline in the class definition like the other two. We really would love "using" here, but it doesn't play nicely with virtual functions.
Attachment #8453161 - Flags: review?(efaustbmo) → review+
Also fixed in bug 1111243.
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1111243
You need to log in before you can comment on or make changes to this bug.