| 65 | if (handleInterrupt(attachedJsFunctionData->jsContext, exceptionTracker)) { |
| 66 | return onJsCallError(ctx, exceptionTracker, exception); |
| 67 | } |
| 68 | |
| 69 | auto result = (*attachedJsFunctionData->function)(callContext); |
| 70 | |
| 71 | if (VALDI_LIKELY(exceptionTracker)) { |
| 72 | return fromValdiJSValue(result.get()).valueRef; |
| 73 | } else { |
| 74 | return onJsCallError(ctx, exceptionTracker, exception); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | static JSValueRef callNativeClassAsFunction(JSContextRef ctx, |
| 79 | JSObjectRef function, |
| 80 | JSObjectRef /*thisObject*/, |
| 81 | size_t /*argumentCount*/, |
| 82 | const JSValueRef[] /*arguments*/, |