Closed Bug 1349637 Opened 8 years ago Closed 8 years ago

Remove unnecessary expose call when unwrapping a wrapper

Categories

(Core :: JavaScript: GC, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

Back in bug 1298773 we added a call to ExposeObjectToActiveJS in Wrapper::wrappedObject. The problem seemed to be that you could unwrap a black wrapper but receive a gray target when unwrapping. This is now no longer possible for two reasons: we ensure that we do an expose on wrapper targets when mark the wrapper black even if the target is not in a zone that we're collecting, and we updated our assertions to ignore cases where the object is temporarily gray but we know the GC will mark it black in the future. Here is a patch to remove the expose and replace it with an assertion that the result is not gray. I had to add an expose call when recomputing wrappers by compartment as the target can be gray here. I also added some additional assertions that setting an object's private to a GC thing does not create a black to gray edge. Try results look good so far: https://treeherder.mozilla.org/#/jobs?repo=try&revision=85a2f9c168d66506283a484e3230f1e53321eaa8&group_state=expanded&selectedJob=85668400
Attachment #8850111 - Flags: review?(sphink)
Attachment #8850111 - Flags: review?(sphink) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Depends on: 1350168
As pointed out in bug 1350248, this expose call is currently necessary after all, so I'm backing this out: https://hg.mozilla.org/integration/mozilla-inbound/rev/43c977e120c535bb198c4be52a378ea7dc129690
Resolution: FIXED → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: