Open Bug 1118026 Opened 8 years ago Updated 8 years ago

Store GC things as JS::GCCellPtr in the cycle collector graph

Categories

(Core :: XPCOM, defect)

32 Branch
defect
Not set
normal

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

Details

This will let us get rid of a call to js::GCThingTraceKind in the CC.
I looked at this some, but it is a little tricky.  In addition to changing JSGCThingParticipant::Traverse(), you need to carefully audit every place that looks at the mPointer field of a PtrInfo, and ensure that if it is possible that it is a JS pointer, you mask out the bits.  In most places, you know statically, but there's some places related to logging where you don't, and I'm not sure what the best way to go about that is.  Maybe just check is IsGrayJS() || IsBlackJS(), because we don't care about performance that much in that case.
Oh, and you also have to add this awful API to GCCellPtr that returns the inner pointer thing as a void*, and then another way to construct a GCCellPtr from a void*.
You need to log in before you can comment on or make changes to this bug.