diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-11-08 09:22:13 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-11-11 10:02:30 +0300 |
commit | 344d33eef110486bc094ba8d97a483379bf62752 (patch) | |
tree | 9d929c9fc5a77665f6a5b13defc2b9e0c8c19af3 /src/tty_wrap.cc | |
parent | 19e5e78e9c65605eba43b8c506a8069f6f6d5ff9 (diff) |
src: fix v8 compiler warnings in src
This commit changes the code to use the maybe version.
PR-URL: https://github.com/nodejs/node/pull/24246
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'src/tty_wrap.cc')
-rw-r--r-- | src/tty_wrap.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index c099b14ec4d..2523f57b2d4 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -59,7 +59,9 @@ void TTYWrap::Initialize(Local<Object> target, env->SetMethodNoSideEffect(target, "isTTY", IsTTY); env->SetMethodNoSideEffect(target, "guessHandleType", GuessHandleType); - target->Set(ttyString, t->GetFunction(env->context()).ToLocalChecked()); + target->Set(env->context(), + ttyString, + t->GetFunction(env->context()).ToLocalChecked()).FromJust(); env->set_tty_constructor_template(t); } @@ -112,8 +114,8 @@ void TTYWrap::GetWindowSize(const FunctionCallbackInfo<Value>& args) { if (err == 0) { Local<v8::Array> a = args[0].As<Array>(); - a->Set(0, Integer::New(env->isolate(), width)); - a->Set(1, Integer::New(env->isolate(), height)); + a->Set(env->context(), 0, Integer::New(env->isolate(), width)).FromJust(); + a->Set(env->context(), 1, Integer::New(env->isolate(), height)).FromJust(); } args.GetReturnValue().Set(err); |