Closed Bug 1779378 Opened 2 years ago Closed 2 years ago

Avoid unnecessary tenuring via PropertyIteratorObject

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

PropertyIteratorObject is always tenured. Because we don't null out NativeIterator::objectBeingIterated_ for inactive iterators, we can end up tenuring objects that should be dead.

This happens a fair amount on the matrix-react benchmark.

In isEmptyIteratorSingleton() we currently check whether objectBeingIterated == nullptr,
but once we clear this object for inactive iterators this would be a bit confusing and
error-prone.

Property iterator objects are always tenured, so this avoids "leaking" the object
via the post-barrier.

Depends on D151705

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8f77075a0e5
part 1 - Add IsEmptyIteratorSingleton flag. r=jonco
https://hg.mozilla.org/integration/autoland/rev/76d4db257788
part 2 - Clear NativeIterator::objectBeingIterated_ when closing the iterator. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: