Struct xpcom::interfaces::nsICycleCollectorHandler [] [src]

#[repr(C)]
pub struct nsICycleCollectorHandler { /* fields omitted */ }

interface nsICycleCollectorHandler : nsISupports

/**
 * A set of interfaces for recording the cycle collector's work. An instance
 * of @mozilla.org/cycle-collector-logger;1 can be configured to enable various
 * options, then passed to the cycle collector when it runs.
 * Note that additional logging options are available by setting environment
 * variables, as described at the top of nsCycleCollector.cpp.
 */
/**
 * nsICycleCollectorHandler is the interface JS code should implement to
 * receive the results logged by a @mozilla.org/cycle-collector-logger;1
 * instance. Pass an instance of this to the logger's 'processNext' method
 * after the collection has run. This will describe the objects the cycle
 * collector visited, the edges it found, and the conclusions it reached
 * about the liveness of objects.
 *
 * In more detail:
 * - For each node in the graph:
 *   - a call is made to either |noteRefCountedObject| or |noteGCedObject|, to
 *     describe the node itself; and
 *   - for each edge starting at that node, a call is made to |noteEdge|.
 *
 * - Then, a series of calls are made to:
 *   - |describeRoot|, for reference-counted nodes that the CC has identified as
 *     being alive because there are unknown references to those nodes.
 *   - |describeGarbage|, for nodes the cycle collector has identified as garbage.
 *
 *   Any node not mentioned in a call to |describeRoot| or |describeGarbage| is
 *   neither a root nor garbage. The cycle collector was able to find all of the
 *   edges implied by the node's reference count.
 */

Methods

impl nsICycleCollectorHandler
[src]

[src]

Cast this nsICycleCollectorHandler to one of its base interfaces.

impl nsICycleCollectorHandler
[src]

[src]

void noteRefCountedObject (in ACString aAddress, in unsigned long aRefCount, in ACString aObjectDescription);

[src]

void noteGCedObject (in ACString aAddress, in boolean aMarked, in ACString aObjectDescription, in ACString aCompartmentAddress);

[src]

void noteEdge (in ACString aFromAddress, in ACString aToAddress, in ACString aEdgeName);

[src]

void describeRoot (in ACString aAddress, in unsigned long aKnownEdges);

[src]

void describeGarbage (in ACString aAddress);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsICycleCollectorHandler
[src]

IID: nsIID = nsID(2131309415, 5266, 19337, [135, 175, 192, 29, 188, 131, 18, 70])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsICycleCollectorHandler
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsICycleCollectorHandler
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.