diff options
author | Yaniv Friedensohn <yaniv.friedensohn@gmail.com> | 2019-05-11 20:00:38 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-08-10 01:58:58 +0300 |
commit | a0e2c6d2843ea6e37035a949827cdcc7949026d6 (patch) | |
tree | 8324272d3272db9c67a81d16c1dfd0e225069248 /src/string_bytes.cc | |
parent | c065773cc56080b48ff4e29822152679f7db5573 (diff) |
src: add error codes to errors thrown in C++
PR-URL: https://github.com/nodejs/node/pull/27700
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/string_bytes.cc')
-rw-r--r-- | src/string_bytes.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 131a0333be2..f8d7243e5d6 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -392,15 +392,6 @@ size_t StringBytes::Write(Isolate* isolate, } -bool StringBytes::IsValidString(Local<String> string, - enum encoding enc) { - if (enc == HEX && string->Length() % 2 != 0) - return false; - // TODO(bnoordhuis) Add BASE64 check? - return true; -} - - // Quick and dirty size calculation // Will always be at least big enough, but may have some extra // UTF8 can be as much as 3x the size, Base64 can have 1-2 extra bytes |