| 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"); |
| 103 | } |
| 104 | if (JS_VALUE_GET_PTR(funcObject) != JS_VALUE_GET_PTR(newTarget)) { |
| 105 | return JS_ThrowTypeError(context, "Native class subclassing is not supported"); |
| 106 | } |
| 107 | |
| 108 | auto& valdiJsContext = *getValdiJSContext(context); |
no test coverage detected