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 BethGriggs committed Nov 24, 2021
1 parent 789fef1 commit 579f01c
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 @@ -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)`

<!-- YAML
Expand Down Expand Up @@ -564,10 +568,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 579f01c

Please sign in to comment.