Oolite 1.91.0.7699-250829-cea269d
Loading...
Searching...
No Matches
OOJSGlobal.h File Reference
import <Foundation/Foundation.h>
#include <jsapi.h>
Include dependency graph for OOJSGlobal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void CreateOOJSGlobal (JSContext *context, JSObject **outGlobal)
void SetUpOOJSGlobal (JSContext *context, JSObject *global)

Function Documentation

◆ CreateOOJSGlobal()

void CreateOOJSGlobal ( JSContext * context,
JSObject ** outGlobal )

Definition at line 160 of file OOJSGlobal.m.

161{
162 assert(outGlobal != NULL);
163
164 *outGlobal = JS_NewCompartmentAndGlobalObject(context, &sGlobalClass, NULL);
165
166 JS_SetGlobalObject(context, *outGlobal);
167 JS_DefineProperty(context, *outGlobal, "global", OBJECT_TO_JSVAL(*outGlobal), NULL, NULL, OOJS_PROP_READONLY);
168}
static JSClass sGlobalClass
Definition OOJSGlobal.m:87
#define OOJS_PROP_READONLY

References OOJS_PROP_READONLY, and sGlobalClass.

Referenced by OOJavaScriptEngine(Private)::createMainThreadContext.

Here is the caller graph for this function:

◆ SetUpOOJSGlobal()

void SetUpOOJSGlobal ( JSContext * context,
JSObject * global )

Definition at line 171 of file OOJSGlobal.m.

172{
173 JS_DefineProperties(context, global, sGlobalProperties);
174 JS_DefineFunctions(context, global, sGlobalMethods);
175}
static JSFunctionSpec sGlobalMethods[]
Definition OOJSGlobal.m:132
static JSPropertySpec sGlobalProperties[]
Definition OOJSGlobal.m:120

References sGlobalMethods, and sGlobalProperties.

Referenced by OOJavaScriptEngine(Private)::createMainThreadContext.

Here is the caller graph for this function: