diff --git a/src/string_bytes.cc b/src/string_bytes.cc index daff1424d22e5a..5b530c85477310 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -642,10 +642,6 @@ MaybeLocal StringBytes::Encode(Isolate* isolate, switch (encoding) { case BUFFER: { - if (buflen > node::Buffer::kMaxLength) { - *error = node::ERR_BUFFER_TOO_LARGE(isolate); - return MaybeLocal(); - } auto maybe_buf = Buffer::Copy(isolate, buf, buflen); Local buf; if (!maybe_buf.ToLocal(&buf)) {