Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-08 09:22:13 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-11-11 10:02:30 +0300
commit344d33eef110486bc094ba8d97a483379bf62752 (patch)
tree9d929c9fc5a77665f6a5b13defc2b9e0c8c19af3 /src/stream_base-inl.h
parent19e5e78e9c65605eba43b8c506a8069f6f6d5ff9 (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/stream_base-inl.h')
-rw-r--r--src/stream_base-inl.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h
index 0209281f942..1d6ec17b802 100644
--- a/src/stream_base-inl.h
+++ b/src/stream_base-inl.h
@@ -179,7 +179,9 @@ inline int StreamBase::Shutdown(v8::Local<v8::Object> req_wrap_obj) {
const char* msg = Error();
if (msg != nullptr) {
- req_wrap_obj->Set(env->error_string(), OneByteString(env->isolate(), msg));
+ req_wrap_obj->Set(
+ env->context(),
+ env->error_string(), OneByteString(env->isolate(), msg)).FromJust();
ClearError();
}
@@ -228,7 +230,9 @@ inline StreamWriteResult StreamBase::Write(
const char* msg = Error();
if (msg != nullptr) {
- req_wrap_obj->Set(env->error_string(), OneByteString(env->isolate(), msg));
+ req_wrap_obj->Set(env->context(),
+ env->error_string(),
+ OneByteString(env->isolate(), msg)).FromJust();
ClearError();
}
@@ -434,8 +438,10 @@ inline void StreamReq::Done(int status, const char* error_str) {
AsyncWrap* async_wrap = GetAsyncWrap();
Environment* env = async_wrap->env();
if (error_str != nullptr) {
- async_wrap->object()->Set(env->error_string(),
- OneByteString(env->isolate(), error_str));
+ async_wrap->object()->Set(env->context(),
+ env->error_string(),
+ OneByteString(env->isolate(), error_str))
+ .FromJust();
}
OnDone(status);