Commit 11b34a91 authored by Michaël Zasso's avatar Michaël Zasso Committed by Node.js GitHub Bot
Browse files

string_decoder: throw ERR_STRING_TOO_LONG for UTF-8

String::NewFromUtf8 doesn't generate an exception in V8 when the string
is too long but is guaranteed to return an empty MaybeLocal only in
that case. Generate a Node.js exception when it happens.

Fixes: https://github.com/nodejs/node/issues/35676

PR-URL: https://github.com/nodejs/node/pull/36661


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarGireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent c380ee67
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment