Status

()

Core
JavaScript Engine
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: jorendorff, Assigned: mrbkap)

Tracking

Other Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [compartments])

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
At a minimum, XrayWrappers can only wrap Holder objects; we don't currently create Holder objects anywhere. WrapperFactory must be changed to create them.

However I am worried about XrayWrapper<JSCrossCompartmentWrapper>. It seems like that combination wouldn't actually provide x-ray behavior for any of the methods that the XrayWrapper template doesn't explicitly override, like get() and set().

Also the fact that the two are merged in a single handler means the wrappedObject must be both a Holder and in another compartment. But XrayWrapper doesn't treat the holder as though it's in another compartment.

Maybe swapping the two would fix it: JSCrossCompartmentWrapper<XrayWrapper>. With that, the JSCrossCompartmentWrapper methods are called first. They handle rewrapping and then delegate to XrayWrapper methods. By the time XrayWrapper is called, all the arguments are same-compartment.

This blocks "throwing the switch".
(Assignee)

Updated

7 years ago
Blocks: 584237
No longer blocks: 584198

Updated

7 years ago
Whiteboard: [compartments]
(Reporter)

Comment 1

7 years ago
Created attachment 466801 [details] [diff] [review]
WIP 1 - just refactor JSCrossCompartmentWrapper into a template

The template has to be instantiated from XPConnect (!) so all the methods go into a new jswrapperinlines.h header.
(Reporter)

Updated

7 years ago
Assignee: jorendorff → mrbkap

Comment 2

7 years ago
Fixed in Blake's patch queue.

Comment 3

7 years ago
(In reply to comment #2)
> Fixed in Blake's patch queue.

So this can be marked as FIXED, yes?

Comment 4

7 years ago
Yup. Got obsoleted.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.