JS_DumpNamedRoots

  • Revision slug: SpiderMonkey/JSAPI_Reference/JS_DumpNamedRoots
  • Revision title: JS_DumpNamedRoots
  • Revision id: 133906
  • Created:
  • Creator: MMondor
  • Is current revision? No
  • Comment

Revision Content

<title>JS_DumpNamedRoots</title> {{template.Jsapiref()}}

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);
Name Type Description
rt JSRuntime * Pointer to a JSRuntime from which to dump named roots.
dump <tt>void (*)(const char *, void *, void *)</tt> Pointer to function that actually dumps the named roots.
data void * 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 <code>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 Functions
Documents {{template.LXRSearch("ident", "i", "JS_DumpNamedRoots", "LXR ID Search")}}
Entries

JS_AddNamedRoot, JS_AddRoot, JS_RemoveRoot

Revision Source

<p> &lt;title&gt;JS_DumpNamedRoots&lt;/title&gt;
{{template.Jsapiref()}}
</p>
<h2 name="Summary"> Summary </h2>
<p>Enumerates the named roots in the garbage collection hash table.
</p>
<h2 name="Syntax"> Syntax </h2>
<pre>void JS_DumpNamedRoots(JSRuntime *rt,
    void (*dump)(const char *name, void *rp, void *data),
    void *data);
</pre>
<table class="fullwidth-table">
<tbody><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><code>rt</code></td>
<td><code>JSRuntime *</code></td>
<td>Pointer to a JSRuntime from which to dump named roots.</td>
</tr>
<tr>
<td><code>dump</code></td>
<td><tt>void (*)(const char *, void *, void *)</tt></td>
<td>Pointer to function that actually dumps the named roots.</td>
</tr>
<tr>
<td><code>data</code></td>
<td><code>void *</code></td>
<td>Pointer to a storage area into which to put a root's data.</td>
</tr>
</tbody></table>
<h2 name="Description"> Description </h2>
<p><code>JS_DumpNamedRoots</code> retrieves information from the garbage collection hash table about the named roots associated with a specific <code>JSRuntime</code>, <code>rt</code>.
</p><p><code>dump is the name of the function that actually retrieves the information from the hash table. If you pass a &lt;code&gt;NULL</code> 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:
</p>
<table class="fullwidth-table">
<tbody><tr>
<th>Argument</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><code>name</code></td>
<td><code>const char *</code></td>
<td>Name of the current hash entry.</td>
</tr>
<tr>
<td><code>rp</code></td>
<td><code>void *</code></td>
<td>Pointer to the named roots.</td>
</tr>
<tr>
<td><code>data</code></td>
<td><code>void *</code></td>
<td>Pointer to a storage area into which to put a root's data.</td>
</tr>
</tbody></table>
<p><code>data</code> is a pointer to the storage structure into which to return retrieved information. If you pass a <code>NULL</code> 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.
</p>
<h2 name="See_Also"> See Also </h2>
<table class="fullwidth-table">
<tbody><tr>
<td>Groups</td>
<td><a href="en/JSAPI_Reference#Functions">Functions</a></td>
</tr>
<tr>
<td>Documents</td>
<td>{{template.LXRSearch("ident", "i", "JS_DumpNamedRoots", "LXR ID Search")}}</td>
</tr>
<tr>
<td>Entries</td>
<td>
<p><a href="en/JS_AddNamedRoot">JS_AddNamedRoot</a>,
<a href="en/JS_AddRoot">JS_AddRoot</a>,
<a href="en/JS_RemoveRoot">JS_RemoveRoot</a>
</p>
</td>
</tr>
</tbody></table>
Revert to this revision