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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: David Carlier <[email protected]>
  • Loading branch information
danbev committed Jun 8, 2020
1 parent b9739b6 commit 8a4b5c6
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 @@ -555,7 +555,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 @@ -566,7 +566,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 8a4b5c6

Please sign in to comment.