Skip to content

Commit

Permalink
src: fulfill Maybe contract in InlineDecoder
Browse files Browse the repository at this point in the history
Use an empty/nothing `Maybe<>` to indicate a pending exception.

PR-URL: #25140
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax authored and BethGriggs committed Jul 16, 2019
1 parent 14090b5 commit a8f78f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/string_bytes.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class StringBytes {
enum encoding enc = ParseEncoding(env->isolate(), encoding, _default);
if (!StringBytes::IsValidString(string, enc)) {
env->ThrowTypeError("Bad input string");
return v8::Just(false);
return v8::Nothing<bool>();
}

size_t storage;
Expand Down

0 comments on commit a8f78f0

Please sign in to comment.