mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 935721, part 8 - Add a reference to the graph to the graph builder. r=smaug
This moves towards letting the CC graph outlive the builder.
This commit is contained in:
parent
77917883a8
commit
06ae914761
@ -1557,10 +1557,10 @@ class GCGraphBuilder : public nsCycleCollectionTraversalCallback,
|
||||
public nsCycleCollectionNoteRootCallback
|
||||
{
|
||||
private:
|
||||
GCGraph &mGraph;
|
||||
CycleCollectorResults &mResults;
|
||||
NodePool::Builder mNodeBuilder;
|
||||
EdgePool::Builder mEdgeBuilder;
|
||||
nsTArray<WeakMapping> &mWeakMaps;
|
||||
PLDHashTable mPtrToNodeMap;
|
||||
PtrInfo *mCurrPi;
|
||||
nsCycleCollectionParticipant *mJSParticipant;
|
||||
@ -1659,10 +1659,10 @@ GCGraphBuilder::GCGraphBuilder(GCGraph &aGraph,
|
||||
CycleCollectedJSRuntime *aJSRuntime,
|
||||
nsICycleCollectorListener *aListener,
|
||||
bool aMergeZones)
|
||||
: mResults(aResults),
|
||||
: mGraph(aGraph),
|
||||
mResults(aResults),
|
||||
mNodeBuilder(aGraph.mNodes),
|
||||
mEdgeBuilder(aGraph.mEdges),
|
||||
mWeakMaps(aGraph.mWeakMaps),
|
||||
mJSParticipant(nullptr),
|
||||
mJSZoneParticipant(nullptr),
|
||||
mListener(aListener),
|
||||
@ -1891,7 +1891,7 @@ GCGraphBuilder::NoteWeakMapping(void *map, void *key, void *kdelegate, void *val
|
||||
{
|
||||
// Don't try to optimize away the entry here, as we've already attempted to
|
||||
// do that in TraceWeakMapping in nsXPConnect.
|
||||
WeakMapping *mapping = mWeakMaps.AppendElement();
|
||||
WeakMapping *mapping = mGraph.mWeakMaps.AppendElement();
|
||||
mapping->mMap = map ? AddWeakMapNode(map) : nullptr;
|
||||
mapping->mKey = key ? AddWeakMapNode(key) : nullptr;
|
||||
mapping->mKeyDelegate = kdelegate ? AddWeakMapNode(kdelegate) : mapping->mKey;
|
||||
|
Loading…
Reference in New Issue
Block a user