| 105 | if (JS_VALUE_GET_PTR(funcObject) != JS_VALUE_GET_PTR(newTarget)) { |
| 106 | return JS_ThrowTypeError(context, "Native class subclassing is not supported"); |
| 107 | } |
| 108 | |
| 109 | auto& valdiJsContext = *getValdiJSContext(context); |
| 110 | auto nativeClass = getNativeClassConstructorData(funcObject); |
| 111 | auto constructor = nativeClass->getConstructor(); |
| 112 | if (constructor == nullptr) { |
| 113 | return JS_ThrowTypeError(context, "Native class cannot be constructed from JavaScript"); |
| 114 | } |
| 115 | |
| 116 | Valdi::JSValueRef arguments[argc]; |
no test coverage detected