Closed Bug 862629 Opened 11 years ago Closed 11 years ago

Stop wrapping WebIDL callbacks into the compartment of the thing we're passing them to

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

This is causing failures with WebIDL event listeners, because if we addEventListener via an Xray we end up wrapping it into the content compartment, and then we can't get it's .handleEvent.

I talked to Kyle and Bobby and they both think we should just stop doing this wrapping altogether rather than special-casing Xrays somehow.
Whiteboard: [need review]
Blocks: 753453
Blocks: 864313
Comment on attachment 738298 [details] [diff] [review]
part 1.  Stop playing compartment games with WebIDL callbacks and just use the given object as-is.

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

::: dom/bindings/CallbackFunction.h
@@ +30,2 @@
>    {
> +    MOZ_ASSERT(JS_ObjectIsCallable(nullptr, aCallable));

Want to file a bug on removing the cx argument or adding a friend api that doesn't need one?
Attachment #738298 - Flags: review?(peterv) → review+
Attachment #738299 - Flags: review?(peterv) → review+
> Want to file a bug on removing the cx argument

Filed bug 865399.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: