diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-12-29 16:17:12 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-01-07 21:21:32 +0100 |
commit | b171adc4d12e96f7b72155ea54a78dd1c8e5823f (patch) | |
tree | 270ff46d16f7e3e1c534ddcf1fb674b12e654108 /src/js_stream.cc | |
parent | 8a86d9c1cf35fe4f892d483e3673083f5d8f42cf (diff) | |
download | android-node-v8-b171adc4d12e96f7b72155ea54a78dd1c8e5823f.tar.gz android-node-v8-b171adc4d12e96f7b72155ea54a78dd1c8e5823f.tar.bz2 android-node-v8-b171adc4d12e96f7b72155ea54a78dd1c8e5823f.zip |
lib: remove queue implementation from JSStreamWrap
The streams implementation generally ensures that only one write()
call is active at a time. `JSStreamWrap` instances still kept
queue of write reqeuests in spite of that; refactor it away.
Also, fold `isAlive()` into a constant function on the native side.
PR-URL: https://github.com/nodejs/node/pull/17918
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/js_stream.cc')
-rw-r--r-- | src/js_stream.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/js_stream.cc b/src/js_stream.cc index c4e32feeba..dba6d1a52b 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -80,13 +80,7 @@ AsyncWrap* JSStream::GetAsyncWrap() { bool JSStream::IsAlive() { - HandleScope scope(env()->isolate()); - Context::Scope context_scope(env()->context()); - v8::Local<v8::Value> fn = object()->Get(env()->isalive_string()); - if (!fn->IsFunction()) - return false; - return MakeCallback(fn.As<v8::Function>(), 0, nullptr) - .ToLocalChecked()->IsTrue(); + return true; } |