summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2017-01-12 13:43:01 -0500
committercjihrig <cjihrig@gmail.com>2017-01-17 10:47:28 -0500
commit8f3ff98f0e59926e7de3de56497cef270918629b (patch)
treef032a77adffe78da1ae95f2c7750fc8802b9a9ed /src
parent0f0f3d33309d3382deb33825fdffeb048f80ec18 (diff)
downloadandroid-node-v8-8f3ff98f0e59926e7de3de56497cef270918629b.tar.gz
android-node-v8-8f3ff98f0e59926e7de3de56497cef270918629b.tar.bz2
android-node-v8-8f3ff98f0e59926e7de3de56497cef270918629b.zip
child_process: allow Infinity as maxBuffer value
Fixes: https://github.com/nodejs/node/pull/10767 PR-URL: https://github.com/nodejs/node/pull/10769 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/spawn_sync.cc4
-rw-r--r--src/spawn_sync.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc
index 68e7814757..93e51af38f 100644
--- a/src/spawn_sync.cc
+++ b/src/spawn_sync.cc
@@ -765,8 +765,8 @@ int SyncProcessRunner::ParseOptions(Local<Value> js_value) {
Local<Value> js_max_buffer = js_options->Get(env()->max_buffer_string());
if (IsSet(js_max_buffer)) {
- CHECK(js_max_buffer->IsUint32());
- max_buffer_ = js_max_buffer->Uint32Value();
+ CHECK(js_max_buffer->IsNumber());
+ max_buffer_ = js_max_buffer->NumberValue();
}
Local<Value> js_kill_signal = js_options->Get(env()->kill_signal_string());
diff --git a/src/spawn_sync.h b/src/spawn_sync.h
index 8f4c05aa5f..676df43b75 100644
--- a/src/spawn_sync.h
+++ b/src/spawn_sync.h
@@ -184,7 +184,7 @@ class SyncProcessRunner {
static void KillTimerCallback(uv_timer_t* handle);
static void KillTimerCloseCallback(uv_handle_t* handle);
- size_t max_buffer_;
+ double max_buffer_;
uint64_t timeout_;
int kill_signal_;