Closed Bug 1265483 Opened 9 years ago Closed 9 years ago

Use WeakCache to sweep ObjectGroupCompartment::NewTable

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file)

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+
https://hg.mozilla.org/integration/mozilla-inbound/rev/ddd7892d4ed6c18b9bbc1a6e25803b5e628452a7 Bug 1265483 - Use WeakCache to automate sweeping of ObjectGroupCompartment::NewTable; r=jonco
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: