43 LocalVar<JsObject> global = JSContextGetGlobalObject(cx);
46 LocalVar<JsObject> ctor_obj = UnsafeJsCast<JsObject>(ctor);
48 LocalVar<JsValue> ret;
49 std::vector<LocalVar<JsValue>> local_args{args, args + argc};
bool IsObject(Handle< JsValue > value)
JSValueRef CreateNativeObject(const std::string &name, JSValueRef *args, size_t argc)
static JsEngine * Instance()
std::string ConvertToString(Handle< JsValue > value)
JSContextRef GetContext()
void OnUncaughtException(JSValueRef exception, bool in_promise)
bool InvokeConstructor(Handle< JsFunction > ctor, int argc, LocalVar< JsValue > *argv, LocalVar< JsValue > *result_or_except)
ReturnVal< JsValue > GetMemberRaw(Handle< JsObject > object, const std::string &name, LocalVar< JsValue > *exception=nullptr)