Change sendCommand xpcshell function to check for function objects

RESOLVED FIXED in Firefox 63

Status

()

enhancement
P2
normal
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

10 months ago
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.
Assignee

Updated

10 months ago
Summary: Change sendCommand XPC shell function to check for function objects → Change sendCommand xpcshell function to check for function objects

Updated

10 months ago
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+

Comment 3

10 months ago
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

Comment 4

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/bb9cb191c067
Status: ASSIGNED → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.