JS_GetRuntime

  • Revision slug: SpiderMonkey/JSAPI_Reference/JS_GetRuntime
  • Revision title: JS_GetRuntime
  • Revision id: 146947
  • Created:
  • Creator: Mgjbot
  • Is current revision? No
  • Comment robot Adding: [[ja:JS GetRuntime]] <<langbot>>

Revision Content

{{ Jsapi_ref_header("JS_GetRuntime") }}

Retrieves a pointer to the JSRuntime.

Syntax

JSRuntime * JS_GetRuntime(JSContext *cx);
Name Type Description
cx JSContext * The context to query.

Description

JS_GetRuntime retrieves a pointer to the JSRuntime with which a specified JSContext, cx, is associated. Each context is associated with a particular JSRuntime when it is created (see JS_NewContext); JS_GetRuntime provides a convenient, programmatic way to look up the association.

{{ LXRSearch("ident", "i", "JS_GetRuntime") }}

{{ languages( { "ja": "ja/JS_GetRuntime" } ) }}

Revision Source

<p>{{ Jsapi_ref_header("JS_GetRuntime") }}
</p><p>Retrieves a pointer to the <code>JSRuntime</code>.
</p>
<h2 name="Syntax"> Syntax </h2>
<pre class="eval"><a href="en/JSRuntime">JSRuntime</a> * <b>JS_GetRuntime</b>(<a href="en/JSContext">JSContext</a> *cx);
</pre>
<table class="fullwidth-table">
<tbody><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><code>cx</code></td>
<td><code><a href="en/JSContext">JSContext</a> *</code></td>
<td>The context to query.</td>
</tr>
</tbody></table>
<h2 name="Description"> Description </h2>
<p><code>JS_GetRuntime</code> retrieves a pointer to the <code>JSRuntime</code> with which a specified <code>JSContext</code>, <code>cx</code>, is associated. Each context is associated with a particular <code>JSRuntime</code> when it is created (see <code><a href="en/JS_NewContext">JS_NewContext</a></code>); <code>JS_GetRuntime</code> provides a convenient, programmatic way to look up the association.
</p><p>{{ LXRSearch("ident", "i", "JS_GetRuntime") }}
</p>
<div class="noinclude">
</div>
{{ languages( { "ja": "ja/JS_GetRuntime" } ) }}
Revert to this revision