diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-06-14 13:58:20 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-14 13:56:36 -0700 |
commit | 1361e302234b17ab8079107b134dfd0ddf288439 (patch) | |
tree | a38ce903ddbd89ee2dfd437bd8f984cb1d85695b /core/libdeno/api.cc | |
parent | 3dff147d0ca1a2cd8d264d20a178d71cb38b1c4e (diff) |
Revert "Refactor dispatch handling (#2452)"
Due to performance regression:
https://github.com/denoland/deno/commit/dc60fe9f300043f191286ef804a365e16e455f87#commitcomment-33943711
This reverts commit dc60fe9f300043f191286ef804a365e16e455f87.
Diffstat (limited to 'core/libdeno/api.cc')
-rw-r--r-- | core/libdeno/api.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/libdeno/api.cc b/core/libdeno/api.cc index 30f82b6cc..8a3a56156 100644 --- a/core/libdeno/api.cc +++ b/core/libdeno/api.cc @@ -153,15 +153,11 @@ void deno_pinned_buf_delete(deno_pinned_buf* buf) { auto _ = deno::PinnedBuf(buf); } -void deno_respond(Deno* d_, void* user_data, deno_buf buf, int* promise_id) { +void deno_respond(Deno* d_, void* user_data, deno_buf buf) { auto* d = unwrap(d_); if (d->current_args_ != nullptr) { // Synchronous response. - if (promise_id != nullptr) { - auto number = v8::Number::New(d->isolate_, *promise_id); - d->current_args_->GetReturnValue().Set(number); - } else { - CHECK_NOT_NULL(buf.data_ptr); + if (buf.data_ptr != nullptr) { auto ab = deno::ImportBuf(d, buf); d->current_args_->GetReturnValue().Set(ab); } |