Change sendCommand xpcshell function to check for function objects

RESOLVED FIXED in Firefox 63

Status

()

enhancement
P2
normal
RESOLVED FIXED
Last year
Last year

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

It currently does |JS_TypeOfValue(cx, args[1]) != JSTYPE_FUNCTION| and CCWs and other proxies can also be JSTYPE_FUNCTION, but a MOZ_RELEASE_ASSERT + a Try push indicates we only pass plain, unwrapped functions.

So we could just check for function objects and then in TestShellCommandParent::RunCallback we can assert we have a JSFunction and we no longer have to worry about wrappers there.
Summary: Change sendCommand XPC shell function to check for function objects → Change sendCommand xpcshell function to check for function objects
Priority: -- → P2
Comment on attachment 8991551 [details] [diff] [review]
Change sendCommand xpcshell function to only accept plain JSFunction callbacks

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

LGTM, although I have never seen this code before
Attachment #8991551 - Flags: review?(evilpies) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bb9cb191c067
Change sendCommand xpcshell function to only accept plain JSFunction callbacks. r=evilpie
https://hg.mozilla.org/mozilla-central/rev/bb9cb191c067
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.