Use WeakCache to sweep ObjectGroupCompartment::NewTable

RESOLVED FIXED in Firefox 48

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

Trunk
mozilla48
Points:
---

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Created attachment 8742450 [details] [diff] [review]
WeakCache_ObjectGroupCompartment_NewTable-v0.diff

This was not as bad as I thought it would be.

Notes:
  1) We need to use .get() for |remove|, since it is present on both bases of WeakCache<HashSet>. We could also punch through the one we want, but I thought this was clearer.
  2) ::Ptr is private in GCHashSet. I think this is in error, but it's better to just use auto here anyway. It's a bit odd that this works, but I guess it's an artifact of the fact that the using decl is private but the underlying type is public.
  3) I did not touch fixupNewTableAfterMovingGC, which is different from |sweep| as it seems to frob a bunch of internals that sweep doesn't care about. I guess if we want to automate this too we'll need to expose it via GCPolicy.
Attachment #8742450 - Flags: review?(jcoppeard)
Comment on attachment 8742450 [details] [diff] [review]
WeakCache_ObjectGroupCompartment_NewTable-v0.diff

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

Ptr is public in HashSet so I think this should be public in GCHashSet too.  But this looks just fine with auto anyway.
Attachment #8742450 - Flags: review?(jcoppeard) → review+
(Assignee)

Comment 3

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ddd7892d4ed6c18b9bbc1a6e25803b5e628452a7
Bug 1265483 - Use WeakCache to automate sweeping of ObjectGroupCompartment::NewTable; r=jonco

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ddd7892d4ed6
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox48: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.