Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Don't allow non-classinfo XPCWNs to be wrapped cross-compartment

RESOLVED FIXED in mozilla14

Status

()

Core
XPConnect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

unspecified
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I was pretty surprised to discover that we do this, since it breaks identity invariants (only showed up in the a11y tests, surprisingly). Thankfully, with bug 734475, we now have a proper fix.

Before landing this, I want to test with my instrumentation from bug 734475 to make sure that this doesn't cause us to take an unreasonable number of unions.
Created attachment 608940 [details] [diff] [review]
patch. v1

Attaching a patch. Flagging mrbkap for review.
Attachment #608940 - Flags: review?(mrbkap)
Pushed to try on its own: https://tbpl.mozilla.org/?tree=Try&rev=1a95dd74653d

Updated

5 years ago
Attachment #608940 - Flags: review?(mrbkap) → review+
This patch reveals more test issues with cpg that were getting masked by wrapping objects that we shouldn't have. But it's fine to land on m-c (with a small test fix).

Pushed to m-c:
http://hg.mozilla.org/integration/mozilla-inbound/rev/597edb1cfe21
Target Milestone: --- → mozilla14
(In reply to Bobby Holley (:bholley) from comment #3)
> Pushed to m-c:

Correction: pushed to _inbound_
https://hg.mozilla.org/mozilla-central/rev/597edb1cfe21
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
I just did the measurement about native set unions. I ran them on the places browser-chrome tests, which run for about a minute on my machine.

============XPCNativeSet Union Statistics=============
Total calls to Union Creator: 80270
Maximum set size encountered: 7
Number of times we reused the first set: 75585
Number of times we reused the second set: 4685
Number of times we made a new set: 0
Maximum number of incremental sets created while making a new set: 0
======================================================

If the reuse the first set, we do a maximum of setSize^2 pointer comparisons. I think this is acceptable.
You need to log in before you can comment on or make changes to this bug.