From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../js_getruntimeprivate/index.html | 59 ---------------------- 1 file changed, 59 deletions(-) delete mode 100644 files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getruntimeprivate/index.html (limited to 'files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getruntimeprivate/index.html') diff --git a/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getruntimeprivate/index.html b/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getruntimeprivate/index.html deleted file mode 100644 index c4f3f7937b..0000000000 --- a/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getruntimeprivate/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: JS GetRuntimePrivate -slug: Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_GetRuntimePrivate -tags: - - JSAPI Reference - - SpiderMonkey -translation_of: Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_GetRuntimePrivate ---- -

- -

- - -

- -

JSRuntimeオブジェクトと関連付けられたアプリケーション固有のフィールドにアクセスします。 Access a <code>JSRuntime</code> field for application-specific data.

- -

構文

- -
void * JS_GetRuntimePrivate(JSRuntime *rt);
-
-void JS_SetRuntimePrivate(JSRuntime *rt, void *data);
-
- - - - - - - - - - - - - - - - - - - -
NameTypeDescription
rtJSRuntime *JavaScriptランタイム環境Any JS runtime.
datavoid *(JS_SetRuntimePrivateのみ)ランタイムrtと関連付けるアプリケーション固有のデータへのポインタ ''(in <code>JS_SetRuntimePrivate</code>)'' Pointer to application-defined data to be associated with the runtime <code>rt</code>.
- -

説明

- -

JSRuntime内には、アプリケーション内で用いる任意のデータを指し示すvoid *型のフィールドが存在します。このフィールドは、コールバック関数が容易にアクセスできる領域であるため、その中でのデータ格納に有用に使えます。JS_GetRuntimePrivateでフィールドの値を取得し、JS_SetRuntimePrivateで値を設定します。フィールドの初期値はNULLに設定されています。 Each <code>JSRuntime</code> has a field of type <code>void *</code> which the application may use for any purpose. It is especially useful for storing data which callbacks may then easily access. <code>JS_GetRuntimePrivate</code> gets the value of this field and <code>JS_SetRuntimePrivate</code> sets it. The field is initially <code>NULL</code>.

- -

このプライベートなデータのメモリ管理はアプリケーション側の責任になります。JavaScriptエンジン自体がこの領域を利用することはありません。 Memory management for this private data is the application's responsibility. The JavaScript engine itself never uses it.

- -

関連項目

- -

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

- -

JS_GetContextPrivate, JS_SetContextPrivate, JS_GetPrivate, JS_SetPrivate, JS_GetInstancePrivate

- -

{{ languages( { "en": "en/JS_GetRuntimePrivate" } ) }}

-- cgit v1.2.3-54-g00ecf