Closed
Bug 1367815
Opened 8 years ago
Closed 8 years ago
Investigate whether proxies other than CCWs store a cross compartment pointer in their private slot
Categories
(Core :: JavaScript: GC, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file)
|
1.98 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
I didn't think this was supposed to happen but the assertion failures in bug 1365564 after the initial patch landed suggest that it does.
Comment 1•8 years ago
|
||
This seems scary. The odds of these sorts of things handling cross-compartment pointers correctly is extremely low.
| Assignee | ||
Comment 2•8 years ago
|
||
I couldn't figure out what was causing this. This patch just adds a couple of assertions to catch this if it ever happens.
Assignee: nobody → jcoppeard
Attachment #8873415 -
Flags: review?(sphink)
Comment 3•8 years ago
|
||
Comment on attachment 8873415 [details] [diff] [review]
bug1367815-cc-proxies
Review of attachment 8873415 [details] [diff] [review]:
-----------------------------------------------------------------
nice
Attachment #8873415 -
Flags: review?(sphink) → review+
Comment 4•8 years ago
|
||
Comment on attachment 8873415 [details] [diff] [review]
bug1367815-cc-proxies
Review of attachment 8873415 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/vm/ProxyObject.cpp
@@ +92,5 @@
> values->init(proxy->numReservedSlots());
>
> proxy->data.handler = handler;
> + if (IsCrossCompartmentWrapper(proxy))
> + proxy->setCrossCompartmentPrivate(priv);
Would it be possible to assert this in setCrossCompartmentPrivate? IsCrossCompartmentWrapper will add a bunch of overhead in opt builds (it's not inlined).
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e5ac6fa7858
Add assertions to prevent proxies other than cross compartment wrappers from having cross compartment targets r=sfink
Comment 6•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•