Skip to content
Permalink
Browse files

src: add .FromJust(), fix -Wunused-result warnings

Missed while reviewing 1fde98b ("v8: expose new V8 serialization API.")

PR-URL: #12118
Refs: #11048
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information...
bnoordhuis authored and addaleax committed Mar 29, 2017
1 parent 8a7db9d commit 7c0079f1beea81270597b5358cb0d783c617efde
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/node_serdes.cc
@@ -271,7 +271,7 @@ DeserializerContext::DeserializerContext(Environment* env,
data_(reinterpret_cast<const uint8_t*>(Buffer::Data(buffer))),
length_(Buffer::Length(buffer)),
deserializer_(env->isolate(), data_, length_, this) {
object()->Set(env->context(), env->buffer_string(), buffer);
object()->Set(env->context(), env->buffer_string(), buffer).FromJust();

MakeWeak<DeserializerContext>(this);
}
@@ -388,8 +388,8 @@ void DeserializerContext::ReadUint64(const FunctionCallbackInfo<Value>& args) {
Local<Context> context = ctx->env()->context();

Local<Array> ret = Array::New(isolate, 2);
ret->Set(context, 0, Integer::NewFromUnsigned(isolate, hi));
ret->Set(context, 1, Integer::NewFromUnsigned(isolate, lo));
ret->Set(context, 0, Integer::NewFromUnsigned(isolate, hi)).FromJust();
ret->Set(context, 1, Integer::NewFromUnsigned(isolate, lo)).FromJust();
return args.GetReturnValue().Set(ret);
}

0 comments on commit 7c0079f

Please sign in to comment.
You can’t perform that action at this time.