From 579f01c0a385f89e3c4cf9a20af868eba7c7cf22 Mon Sep 17 00:00:00 2001 From: Ray Wang Date: Tue, 5 Oct 2021 08:50:50 +0800 Subject: [PATCH] doc: describe buffer limit of v8.serialize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/40243 Fixes: https://github.com/nodejs/node/issues/40059 Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso --- doc/api/v8.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/v8.md b/doc/api/v8.md index e94323e8a71712..ab46699158aba7 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -333,6 +333,10 @@ added: v8.0.0 Uses a [`DefaultSerializer`][] to serialize `value` into a buffer. +[`ERR_BUFFER_TOO_LARGE`][] will be thrown when trying to +serialize a huge object which requires buffer +larger than [`buffer.constants.MAX_LENGTH`][]. + ### `v8.deserialize(buffer)`