Closed Bug 1342653 Opened 7 years ago Closed 7 years ago

Change Nursery::cellsWithUid_ from HashSet to Vector

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
We only add/iterate, so there's no reason not to use a Vector + append.

Debug builds assert the object is not in this set, but I think that invariant is not necessary for correctness so I left it out. If you think that check is useful to keep I'd be happy to add a DEBUG-only loop (with max of 30 iterations or so) to check the object is not in the Vector.
Attachment #8841182 - Flags: review?(jcoppeard)
Comment on attachment 8841182 [details] [diff] [review]
Patch

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

Oh, good catch!  I think it's fine to remove that assert.
Attachment #8841182 - Flags: review?(jcoppeard) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2e4f39721a7a
Use a HashSet instead of a Vector for Nursery::cellsWithUid_. r=jonco
(In reply to Pulsebot from comment #2)
> Pushed by jandemooij@gmail.com:
> https://hg.mozilla.org/integration/mozilla-inbound/rev/2e4f39721a7a
> Use a HashSet instead of a Vector for Nursery::cellsWithUid_. r=jonco

Hrm, this should have been "a Vector instead of a HashSet".
https://hg.mozilla.org/mozilla-central/rev/2e4f39721a7a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.