diff --git a/src/ssb.js.c b/src/ssb.js.c index 74651fb0..1df7ff84 100644 --- a/src/ssb.js.c +++ b/src/ssb.js.c @@ -417,11 +417,15 @@ void _tf_ssb_blob_store_complete(blob_store_t* store, const char* id) if (id) { JSValue id_value = JS_NewString(store->context, id); - JS_Call(store->context, store->promise[0], JS_UNDEFINED, 1, &id_value); + JSValue result = JS_Call(store->context, store->promise[0], JS_UNDEFINED, 1, &id_value); + tf_util_report_error(store->context, result); + JS_FreeValue(store->context, result); } else { - JS_Call(store->context, store->promise[1], JS_UNDEFINED, 0, NULL); + JSValue result = JS_Call(store->context, store->promise[1], JS_UNDEFINED, 0, NULL); + tf_util_report_error(store->context, result); + JS_FreeValue(store->context, result); } tf_util_report_error(store->context, result); JS_FreeValue(store->context, result); @@ -1662,7 +1666,9 @@ static void _tf_ssb_following_after_work(uv_work_t* work, int status) JS_SetPropertyStr(context, entry, "ib", JS_NewInt32(context, following->out_following[i].blocked_by_count)); JS_SetPropertyStr(context, object, following->out_following[i].id, entry); } - JS_Call(context, following->promise[0], JS_UNDEFINED, 1, &object); + JSValue result = JS_Call(context, following->promise[0], JS_UNDEFINED, 1, &object); + tf_util_report_error(context, result); + JS_FreeValue(context, result); JS_FreeValue(context, object); } else @@ -1670,7 +1676,9 @@ static void _tf_ssb_following_after_work(uv_work_t* work, int status) char buffer[256]; uv_strerror_r(status, buffer, sizeof(buffer)); JSValue message = JS_NewString(context, buffer); - JS_Call(context, following->promise[1], JS_UNDEFINED, 1, &message); + JSValue result = JS_Call(context, following->promise[1], JS_UNDEFINED, 1, &message); + tf_util_report_error(context, result); + JS_FreeValue(context, result); JS_FreeValue(context, message); }