From 4221b90c3febbe03a4b47e47248263741a0fdd4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 14 Oct 2019 23:46:27 +0200 Subject: perf: eager poll async ops in Isolate (#3046) --- core/libdeno/api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/libdeno') diff --git a/core/libdeno/api.cc b/core/libdeno/api.cc index 18dc1d43e..061638cb5 100644 --- a/core/libdeno/api.cc +++ b/core/libdeno/api.cc @@ -165,7 +165,7 @@ void deno_respond(Deno* d_, void* user_data, deno_op_id op_id, deno_buf buf) { if (d->current_args_ != nullptr) { // Synchronous response. // Note op_id is not passed back in the case of synchronous response. - if (buf.data_ptr != nullptr) { + if (buf.data_ptr != nullptr && buf.data_len > 0) { auto ab = deno::ImportBuf(d, buf); d->current_args_->GetReturnValue().Set(ab); } -- cgit v1.2.3