summaryrefslogtreecommitdiff
path: root/src/fs_event_wrap.cc
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2019-04-09 15:21:36 -0700
committerSam Roberts <vieuxtech@gmail.com>2019-04-12 12:33:37 -0700
commit060d901f87b3d87314f8540eb02f315e2952f581 (patch)
tree53159171201703bb6d8a4e780c8624a5c6c8cbb5 /src/fs_event_wrap.cc
parent7b0d8673898e65a368108264c77bccaa3e004028 (diff)
downloadandroid-node-v8-060d901f87b3d87314f8540eb02f315e2952f581.tar.gz
android-node-v8-060d901f87b3d87314f8540eb02f315e2952f581.tar.bz2
android-node-v8-060d901f87b3d87314f8540eb02f315e2952f581.zip
src: replace FromJust() with Check() when possible
FromJust() is often used not for its return value, but for its side-effects. In these cases, Check() exists, and is more clear as to the intent. From its comment: To be used, where the actual value of the Maybe is not needed, like Object::Set. See: https://github.com/nodejs/node/pull/26929/files#r269256335 PR-URL: https://github.com/nodejs/node/pull/27162 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'src/fs_event_wrap.cc')
-rw-r--r--src/fs_event_wrap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc
index acdaff586c..b5807dd3ff 100644
--- a/src/fs_event_wrap.cc
+++ b/src/fs_event_wrap.cc
@@ -122,7 +122,7 @@ void FSEventWrap::Initialize(Local<Object> target,
target->Set(env->context(),
fsevent_string,
- t->GetFunction(context).ToLocalChecked()).FromJust();
+ t->GetFunction(context).ToLocalChecked()).Check();
}