Open Bug 749370 (CleanupCC) Opened 8 years ago Updated 4 years ago

[meta] Cycle collector cleanups

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Depends on 4 open bugs)

Details

There is a lot of code in the cycle collector and associated callbacks that isn't used any more.
Depends on: 665564
Depends on: 763773
Depends on: 785666
Adding bjacob's heroic TRAVERSE/UNLINK cleanups and various related bugs.
Depends on: 814453, 814444, 806279, 807437, 800115
Depends on: 814738
Depends on: 814752
I think it can just be replaced with NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRequests).
Depends on: 814898
Generally, anything like nsTArray<nsRefPtr<SomeCycleCollectedClass>> that just iterates over the array and does NoteXPCOMChild or whatever can be turned into a single TRAVERSE now.  Same with nsCOMPtr instead of nsRefPtr, obviously.

There are a number of places with a case like nsTArray<SomeClass>, where SomeClass has a single ref counted field. In that case, you have to define ImplCycleCollectionTraverse for SomeClass. For example, see what I did for nsEventListenerManager in bug 814738. Then you can just do a single line TRAVERSE.
Depends on: 815327
Depends on: 815397
Depends on: 815707
Depends on: 815454
Depends on: 822289
Depends on: 819215
Depends on: 835503
Depends on: 845441
Depends on: 743436
Depends on: 863085
Depends on: 864344
Depends on: 866151
Depends on: 716716
Depends on: 866429
Depends on: 868761
Depends on: 869187
Depends on: 873111
Depends on: 873664
Depends on: 874583
Depends on: 880754
Depends on: 888461
Depends on: 888999
Depends on: 889053
Depends on: 901756
Depends on: 901630
Depends on: 886176
Depends on: 911233
Depends on: 913080
Depends on: 913130
Alias: CleanupCC
Depends on: 914698
Depends on: 915488
Depends on: 921741
Depends on: 928647
Depends on: 930672
Depends on: 937966
Depends on: 931738
Depends on: 1005683
Depends on: 1007722
Depends on: 1033654
Depends on: 1109928
Depends on: 1163657
Depends on: 1164587
Depends on: 1163006
Depends on: 1202670
Depends on: 1208157
You need to log in before you can comment on or make changes to this bug.