Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIDOMGCParticipant Class Reference

DOM GC Participants are objects that expose information about reachability in the native object graphs to help prevent script -> native -> script cyclical reference from causing leaks due to the creation of garbage collection roots and native/script boundaries. More...

#include <nsIDOMGCParticipant.h>

Inheritance diagram for nsIDOMGCParticipant:
Inheritance graph
[legend]
Collaboration diagram for nsIDOMGCParticipant:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual nsIDOMGCParticipantGetSCCIndex ()=0
 Get a reference node for what is known to be a strongly connected component of nsIDOMGCParticipants.
virtual void AppendReachableList (nsCOMArray< nsIDOMGCParticipant > &aArray)=0
 Append the list of nsIDOMGCPartipants reachable from this one via C++ getters exposed to script that return a different result from |GetSCCIndex|.

Detailed Description

DOM GC Participants are objects that expose information about reachability in the native object graphs to help prevent script -> native -> script cyclical reference from causing leaks due to the creation of garbage collection roots and native/script boundaries.

Some implementations of nsIDOMGCParticipant may be responsible for enforcing the requirement that callers of |nsDOMClassInfo::PreserveWrapper| must call |nsDOMClassInfo::ReleaseWrapper| before the nsIDOMGCParticipant argument to the former is destroyed.

Definition at line 62 of file nsIDOMGCParticipant.h.


Member Function Documentation

Append the list of nsIDOMGCPartipants reachable from this one via C++ getters exposed to script that return a different result from |GetSCCIndex|.

The caller is responsible for taking the transitive closure of |AppendReachableList|.

This will only be called on objects that are returned by GetSCCIndex.

null pointers may be appended; they will be ignored by the caller.

Implemented in nsDocument, nsGenericElement, nsGlobalWindow, nsGenericDOMDataNode, nsXMLHttpRequest, nsWindowRoot, nsDOMAttribute, and nsTreeWalker.

Here is the caller graph for this function:

Get a reference node for what is known to be a strongly connected component of nsIDOMGCParticipants.

For example, DOM trees are strongly connected, so can return the root node to greatly reduce the number of nodes on which we need to run graph algorithms.

Note that it's acceptable for nodes in a single strongly connected component to return different values for GetSCCIndex, as long as those two values claim that they're reachable from each other in AppendReachableList.

Implemented in nsDocument, nsGenericElement, nsGlobalWindow, nsGenericDOMDataNode, nsXMLHttpRequest, nsWindowRoot, nsDOMAttribute, and nsTreeWalker.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: