Skip to content

Commit

Permalink
doc: describe buffer limit of v8.serialize
Browse files Browse the repository at this point in the history
PR-URL: #40243
Fixes: #40059
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
rayw000 authored and targos committed Oct 23, 2021
1 parent 7b49e29 commit 14f6c67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 14f6c67

Please sign in to comment.