If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Simplify JS_IterateCompartments

RESOLVED FIXED in mozilla13

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
From bug 702300 comment 61:

> @@ +3773,5 @@
> > +    rt->gcHelperThread.waitBackgroundSweepEnd();
> > +#endif
> > +    AutoUnlockGC unlock(rt);
> > +
> > +    AutoCopyFreeListToArenas copy(rt);
> 
> Waiting for background sweeping to end and the AutoUnlockGC should be
> unnecessary. Same for AutoCopyFreeListToArenas.

The functions that can be simplified are JS_IterateCompartments, IterateCompartmentsArenasCells, and IterateChunks.
It's only JS_IterateCompartments that needs to be changed. The others touch things that are modified by background sweeping (cells and chunks), so they should still wait for it to end. (Although we probably don't need the AutoCopyFreeListToArenas in IterateChunks, but it really doesn't cost us much.)

This is my fault. I should have caught it in review when JS_IterateCompartments landed.
(Assignee)

Comment 2

6 years ago
Created attachment 598757 [details] [diff] [review]
patch
Attachment #598757 - Flags: review?(wmccloskey)
Attachment #598757 - Flags: review?(wmccloskey) → review+
(Assignee)

Updated

6 years ago
Summary: Simplify the GC heap iterator functions → Simplify JS_IterateCompartments
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c3e591a5b867

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/c3e591a5b867
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.