stream_wrap: use v8::Integer::NewFromUnsigned()
Use v8::Integer::NewFromUnsigned() when updating the writeQueueSize field. Before this commit, it used v8::Integer::New() but that takes an int32_t. It's unlikely for a write queue to grow beyond 2**31-1 bytes but let's use the unsigned integer constructor anyway, just in case.
This commit is contained in:
parent
a20d565d9c
commit
2b5b37a3ab
@ -92,8 +92,9 @@ void StreamWrap::GetFD(Local<String>, const PropertyCallbackInfo<Value>& args) {
|
||||
|
||||
void StreamWrap::UpdateWriteQueueSize() {
|
||||
HandleScope scope(node_isolate);
|
||||
object()->Set(write_queue_size_sym,
|
||||
Integer::New(stream()->write_queue_size, node_isolate));
|
||||
Local<Integer> write_queue_size =
|
||||
Integer::NewFromUnsigned(stream()->write_queue_size, node_isolate);
|
||||
object()->Set(write_queue_size_sym, write_queue_size);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user