Skip to content

Commit

Permalink
src: use Check() instead of FromJust in environment
Browse files Browse the repository at this point in the history
This commit replaces FromJust() calls with Check() in places where the
value that FromJust() returns is not used.

PR-URL: #33706
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
  • Loading branch information
danbev authored and codebytere committed Jun 18, 2020
1 parent 7857604 commit cc8d705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,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`
Expand All @@ -564,7 +564,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__
Expand Down

0 comments on commit cc8d705

Please sign in to comment.