From 14f6c67eda88e6da1ab512f8ff0c305ca20ab1b0 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 4eb6aa6f902497..92edce50fc239d 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -335,6 +335,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)`