src: use Check() instead of FromJust in environment

This commit replaces FromJust() calls with Check() in places where the
value that FromJust() returns is not used.

PR-URL: https://github.com/nodejs/node/pull/33706
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
This commit is contained in:
Daniel Bevenius authored and Shelley Vohr committed 2020-07-14 12:13:15 -07:00
1 parent 7aac9832f2
commit 8d258c43c3
1 file changed
+2 -2
+2 -2
View File
@@ -417,7 +417,7 @@ void InitializeContextRuntime(Local<Context> context) {
if (context->Global()->Get(context, intl_string).ToLocal(&intl_v) &&
intl_v->IsObject()) {
Local<Object> intl = intl_v.As<Object>();
intl->Delete(context, break_iter_string).FromJust();
intl->Delete(context, break_iter_string).Check();
}
// Delete `Atomics.wake`
@@ -428,7 +428,7 @@ void InitializeContextRuntime(Local<Context> context) {
if (context->Global()->Get(context, atomics_string).ToLocal(&atomics_v) &&
atomics_v->IsObject()) {
Local<Object> atomics = atomics_v.As<Object>();
atomics->Delete(context, wake_string).FromJust();
atomics->Delete(context, wake_string).Check();
}
// Remove __proto__