JavaScript-1.5 Reference

JS_DumpNamedRoots Function

Summary

Enumerates the named roots in the garbage collection hash table.

Syntax

void JS_DumpNamedRoots(JSRuntime *rt,
    void (*dump)(const char *name, void *rp, void *data),
    void *data);
NameTypeDescription
rtJSRuntime *Pointer to a JSRuntime from which to dump named roots
dumpvoid *Pointer to function that actually dumps the named roots
datavoid *Pointer to a storage area into which to put a root's data.

Description

JS_DumpNamedRoots retrieves information from the garbage collection hash table about the named roots associated with a specific JSRuntime, rt.

dump is the name of the function that actually retrieves the information from the hash table. If you pass a null pointer for this argument, the JS engine defaults to using an internal retrieval function. If you write your own dump function to replace the internal engine function, note that the function you write must accept the following arguments, in order:
Argument Type Description

name

const char *

Name of the current hash entry.

rp

void *

Pointer to the named roots

data

void *

Pointer to a storage area into which to put a root's data.

data is a pointer to the storage structure into which to return retrieved information. If you pass a null pointer for this argument the JS engine defaults to using an internal storage structure for this information. If you write your own dump function, data must be the same as the last argument passed to the dump function.

See Also

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JS_AddNamedRoot | JS_AddRoot | JS_RemoveRoot ]

This page was generated by APIDOC