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]>
danbev authored and codebytere committed Jul 10, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 04fa6d6 commit 4b4fb13
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
@@ -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__

0 comments on commit 4b4fb13

Please sign in to comment.