Browse Source

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

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

PR-URL: https://github.com/nodejs/node/pull/12118
Refs: https://github.com/nodejs/node/pull/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>
v6
Ben Noordhuis 8 years ago
committed by Anna Henningsen
parent
commit
7c0079f1be
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 6
      src/node_serdes.cc

6
src/node_serdes.cc

@ -271,7 +271,7 @@ DeserializerContext::DeserializerContext(Environment* env,
data_(reinterpret_cast<const uint8_t*>(Buffer::Data(buffer))), data_(reinterpret_cast<const uint8_t*>(Buffer::Data(buffer))),
length_(Buffer::Length(buffer)), length_(Buffer::Length(buffer)),
deserializer_(env->isolate(), data_, length_, this) { 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); MakeWeak<DeserializerContext>(this);
} }
@ -388,8 +388,8 @@ void DeserializerContext::ReadUint64(const FunctionCallbackInfo<Value>& args) {
Local<Context> context = ctx->env()->context(); Local<Context> context = ctx->env()->context();
Local<Array> ret = Array::New(isolate, 2); Local<Array> ret = Array::New(isolate, 2);
ret->Set(context, 0, Integer::NewFromUnsigned(isolate, hi)); ret->Set(context, 0, Integer::NewFromUnsigned(isolate, hi)).FromJust();
ret->Set(context, 1, Integer::NewFromUnsigned(isolate, lo)); ret->Set(context, 1, Integer::NewFromUnsigned(isolate, lo)).FromJust();
return args.GetReturnValue().Set(ret); return args.GetReturnValue().Set(ret);
} }

Loading…
Cancel
Save