Skip to content

Commit

Permalink
src: add .FromJust(), fix -Wunused-result warnings
Browse files Browse the repository at this point in the history
Missed while reviewing 1fde98b ("v8: expose new V8 serialization API.")

PR-URL: #12118
Refs: #11048
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
bnoordhuis authored and addaleax committed Mar 31, 2017
1 parent 8a7db9d commit 7c0079f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_serdes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 7c0079f

Please sign in to comment.