| 90 | } |
| 91 | |
| 92 | auto result = functionData->callback(functionData->nativeClass->getOpaque().get(), callContext); |
| 93 | if (VALDI_LIKELY(exceptionTracker)) { |
| 94 | return JS_DupValue(context, fromValdiJSValue(result.get())); |
| 95 | } |
| 96 | return onJsCallError(context, exceptionTracker); |
| 97 | } |
| 98 | |
| 99 | static JSValue callNativeClassConstructor( |
| 100 | JSContext* context, JSValueConst funcObject, JSValueConst newTarget, int argc, JSValueConst* argv, int flags) { |
| 101 | if ((flags & JS_CALL_FLAG_CONSTRUCTOR) == 0) { |
| 102 | return JS_ThrowTypeError(context, "Native class constructor must be called with new"); |
no test coverage detected