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 committed Dec 30, 2018
1 parent fe5b8dc commit b4b9e0e
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 b4b9e0e

Please sign in to comment.