Oolite
Loading...
Searching...
No Matches
OOJSSpecialFunctions.h File Reference
Include dependency graph for OOJSSpecialFunctions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void InitOOJSSpecialFunctions (JSContext *context, JSObject *global)
OOJSValue * JSSpecialFunctionsObjectWrapper (JSContext *context)

Function Documentation

◆ InitOOJSSpecialFunctions()

void InitOOJSSpecialFunctions ( JSContext * context,
JSObject * global )

Definition at line 43 of file OOJSSpecialFunctions.m.

44{
45}

Referenced by OOJavaScriptEngine(Private)::createMainThreadContext.

Here is the caller graph for this function:

◆ JSSpecialFunctionsObjectWrapper()

OOJSValue * JSSpecialFunctionsObjectWrapper ( JSContext * context)

Definition at line 47 of file OOJSSpecialFunctions.m.

48{
49 /*
50 Special object is created on the fly so it can be GCed (the debug
51 console script keeps a reference to its copy, but the prefix script
52 doesn't) and so we don't need to clean up a root on JS engine reset.
53 -- Ahruman 2011-03-30
54 */
55
56 JSObject* special = NULL;
57 OOJSAddGCObjectRoot(context, &special, "OOJSSpecialFunctions");
58
59 special = JS_NewObject(context, NULL, NULL, NULL);
60 JS_DefineFunctions(context, special, sSpecialFunctionsMethods);
61 JS_FreezeObject(context, special);
62
63 OOJSValue* result = [OOJSValue valueWithJSObject:special inContext:context];
64
65 JS_RemoveObjectRoot(context, &special);
66
67 return result;
68}
static JSFunctionSpec sSpecialFunctionsMethods[]
#define OOJSAddGCObjectRoot(context, root, name)

References OOJSAddGCObjectRoot, sSpecialFunctionsMethods, and OOJSValue::valueWithJSObject:inContext:.

Here is the call graph for this function: