| 217 | } |
| 218 | |
| 219 | void Marshaller::onPromiseComplete(int index, const Ref<ValueFunction>& callback) { |
| 220 | auto promise = getOrUndefinedAsRef(index).checkedToValdiObject<Promise>(_exceptionTracker); |
| 221 | if (promise != nullptr) { |
| 222 | promise->onComplete([callback](const Result<Value>& result) { |
| 223 | if (result) { |
| 224 | (*callback)({result.value()}); |
| 225 | } else { |
| 226 | (*callback)({Value(result.error())}); |
| 227 | } |
| 228 | }); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | bool Marshaller::operator!=(const Marshaller& other) const { |
| 233 | return !(*this == other); |
no test coverage detected