Closed Bug 1475177 Opened 7 years ago Closed 7 years ago

Change sendCommand xpcshell function to check for function objects

Categories

(Core :: XPConnect, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

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
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: