Lines Matching refs:aCtx
282 auto aCtx = new AsyncTransactionCtx();
283 aCtx->ctx_ = ctx;
285 NAPI_CALL(env, napi_create_promise(env, &(aCtx->deferred_), &promise));
286 NAPI_CALL(env, napi_create_reference(env, ctx.jsThis_, refCount, &(aCtx->jsThisRef_)));
290 auto aCtx = reinterpret_cast<AsyncTransactionCtx *>(data);
292 auto &ctx = aCtx->ctx_;
293 g_apiTransactClient.Transact(ctx.callInfo_, aCtx->reply_);
296 auto aCtx = reinterpret_cast<AsyncTransactionCtx *>(data);
302 napi_get_reference_value(env, aCtx->jsThisRef_, &(aCtx->ctx_.jsThis_));
303 auto resultValue = UnmarshalReply(env, aCtx->ctx_, aCtx->reply_);
304 napi_delete_reference(env, aCtx->jsThisRef_);
308 napi_reject_deferred(env, aCtx->deferred_, resultValue);
310 napi_resolve_deferred(env, aCtx->deferred_, resultValue);
312 napi_delete_async_work(env, aCtx->asyncWork_);
314 delete aCtx;
316 (void *)aCtx, &(aCtx->asyncWork_));
317 napi_queue_async_work(env, aCtx->asyncWork_);