5 #ifndef _INC_cJSObject_H
6 #define _INC_cJSObject_H
16 #elif defined(__linux__)
24 #include "../../Open/js_1_80/src/jsapi.h"
62 ::JS_DestroyContext(
this);
67 return ::JS_IsRunning(
this) != JS_FALSE;
71 return reinterpret_cast<cJSXContext*
>(::JS_GetContextPrivate(
this));
75 ::JS_SetContextPrivate(
this, p);
82 return static_cast<cJSObject*
>(::JS_NewObject(
this, pJSClass, pjsObjProto, pjsObjParent));
92 ::JS_SetPrivate(
this, pjsObj, pXObj);
97 return static_cast<cJSObject*
>(::JS_GetPrototype(
this, pjsObjGlobal));
101 ASSERT(pjsObjProto !=
nullptr);
102 return JS_GET_CLASS(
this, pjsObjProto);
108 return ::JS_LockGCThing(
this, pjsObjProto) != JS_FALSE;
112 return ::JS_UnlockGCThing(
this, pjsObjProto) != JS_FALSE;
124 ::JS_DestroyRuntime(
this);
133 return static_cast<cJSContext*
>(::JS_NewContext(
this, nStackSize));
#define ASSERT(exp)
Definition: cDebugAssert.h:87
Definition: cJSObject.h:40
Definition: cJSObject.h:56
void SetContextPrivate(cJSXContext *p)
Definition: cJSObject.h:73
cJSObject * NewObject(JSClass *pJSClass, cJSObject *pjsObjProto, cJSObject *pjsObjParent)
Definition: cJSObject.h:80
JSClass * GetClass(cJSObject *pjsObjProto)
Definition: cJSObject.h:99
bool IsRunning()
Definition: cJSObject.h:65
void SetPrivate(cJSObject *pjsObj, GrayLib::cXObject *pXObj)
Definition: cJSObject.h:90
cJSXContext * GetContextPrivate()
Definition: cJSObject.h:69
bool UnlockGCThing(cJSObject *pjsObjProto)
Definition: cJSObject.h:110
bool LockGCThing(cJSObject *pjsObjProto)
Definition: cJSObject.h:105
GrayLib::cXObject * GetPrivate(cJSObject *pjsObj)
Definition: cJSObject.h:85
void DestroyContext()
Definition: cJSObject.h:60
cJSObject * GetPrototype(cJSObject *pjsObjGlobal)
Definition: cJSObject.h:95
Definition: cJSObject.h:47
Definition: cJSObject.h:117
cJSContext * NewContext(size_t nStackSize)
Definition: cJSObject.h:130
void DestroyRuntime()
Definition: cJSObject.h:122
Definition: cJSXContext.h:16
Definition: cXObject.h:78
Definition: cJSObject.h:36
class __DECL_IMPORT cXObject
Definition: cXObject.h:33
Definition: cJSObject.h:27
Definition: cJSObject.h:28
Definition: cJSObject.h:26