setToGlobalObject

This commit is contained in:
ekibun
2021-01-24 16:43:19 +08:00
parent 1589f87194
commit 6b0bab2faf
9 changed files with 228 additions and 142 deletions

View File

@@ -8,7 +8,14 @@
extern "C"
{
typedef void *JSChannel(JSContext *ctx, const char *method, void *argv);
enum JSChannelType {
JSChannelType_METHON = 0,
JSChannelType_MODULE = 1,
JSChannelType_PROMISE_TRACK = 2,
JSChannelType_FREE_OBJECT = 3,
};
typedef void *JSChannel(JSContext *ctx, size_t type, void *argv);
DLLEXPORT JSValue *jsThrowInternalError(JSContext *ctx, char *message);
@@ -30,6 +37,10 @@ extern "C"
DLLEXPORT void jsFreeRuntime(JSRuntime *rt);
DLLEXPORT JSValue *jsNewCFunction(JSContext *ctx, JSValue *funcData);
DLLEXPORT JSValue *jsGetGlobalObject(JSContext *ctx);
DLLEXPORT JSContext *jsNewContext(JSRuntime *rt);
DLLEXPORT void jsFreeContext(JSContext *ctx);