| 47 | VALDI_CLASS_IMPL(BridgeObject) |
| 48 | |
| 49 | Value BridgeObject::doCall(const StringBox& method, |
| 50 | const Value* parameters, |
| 51 | size_t parametersSize, |
| 52 | ValueFunctionFlags flags) { |
| 53 | auto function = _object.getMapValue(method); |
| 54 | if (!function.isFunction()) { |
| 55 | _bridgeContext->onError(Error(STRING_FORMAT("Cannot call '{}' since its not a function", method))); |
| 56 | return Value::undefined(); |
| 57 | } |
| 58 | |
| 59 | return (*function.getFunction())(ValueFunctionCallContext(flags, parameters, parametersSize, *_bridgeContext)); |
| 60 | } |
| 61 | |
| 62 | const Ref<BridgeContext>& BridgeObject::getBridgeContext() const { |
| 63 | return _bridgeContext; |
nothing calls this directly
no test coverage detected