diff options
author | Ray Wang <ray@isrc.iscas.ac.cn> | 2021-10-05 03:50:50 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-10-23 09:47:19 +0300 |
commit | 14f6c67eda88e6da1ab512f8ff0c305ca20ab1b0 (patch) | |
tree | 70ab84bd33ca73c51d8a90ac18bcb1009418e4a1 /doc/api/v8.md | |
parent | 7b49e299391dcbea8d156512008bad0a12d40384 (diff) |
doc: describe buffer limit of v8.serialize
PR-URL: https://github.com/nodejs/node/pull/40243
Fixes: https://github.com/nodejs/node/issues/40059
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'doc/api/v8.md')
-rw-r--r-- | doc/api/v8.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/v8.md b/doc/api/v8.md index 4eb6aa6f902..92edce50fc2 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)` <!-- YAML @@ -566,10 +570,12 @@ A subclass of [`Deserializer`][] corresponding to the format written by [`DefaultDeserializer`]: #class-v8defaultdeserializer [`DefaultSerializer`]: #class-v8defaultserializer [`Deserializer`]: #class-v8deserializer +[`ERR_BUFFER_TOO_LARGE`]: errors.md#err_buffer_too_large [`Error`]: errors.md#class-error [`GetHeapSpaceStatistics`]: https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4 [`NODE_V8_COVERAGE`]: cli.md#node_v8_coveragedir [`Serializer`]: #class-v8serializer +[`buffer.constants.MAX_LENGTH`]: buffer.md#bufferconstantsmax_length [`deserializer._readHostObject()`]: #deserializer_readhostobject [`deserializer.transferArrayBuffer()`]: #deserializertransferarraybufferid-arraybuffer [`serialize()`]: #v8serializevalue |