| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index 38584e8af06efdd848ae92d5c8b8ad412108f528..c1d40b315012fff9c7ad1be6b8d7e7f816c8b0bd 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -1712,6 +1712,15 @@ class V8_EXPORT ValueSerializer {
|
|
|
| virtual Maybe<uint32_t> GetWasmModuleTransferId(
|
| Isolate* isolate, Local<WasmCompiledModule> module);
|
| +
|
| + /*
|
| + * Called when the ValueSerializer encounters a string at least as long as
|
| + * the value passed to |SetMinimumLongStringLength|. The embedder is
|
| + * expected to return an ID for the string.
|
| + */
|
| + virtual Maybe<uint32_t> GetLongStringId(Isolate* isolate,
|
| + Local<String> string);
|
| +
|
| /*
|
| * Allocates memory for the buffer of at least the size provided. The actual
|
| * size (which may be greater or equal) is written to |actual_size|. If no
|
| @@ -1785,6 +1794,14 @@ class V8_EXPORT ValueSerializer {
|
| void SetTreatArrayBufferViewsAsHostObjects(bool mode);
|
|
|
| /*
|
| + * If a positive values is assigned, strings of at least this length will be
|
| + * passed to the delegate instead of serialized inline into the buffer.
|
| + * This option is recommended only if the delegate has a more efficient means
|
| + * of delivering those strings. By default, this feature is disabled.
|
| + */
|
| + void SetMinimumLongStringLength(int size);
|
| +
|
| + /*
|
| * Write raw data in various common formats to the buffer.
|
| * Note that integer types are written in base-128 varint format, not with a
|
| * binary copy. For use during an override of Delegate::WriteHostObject.
|
| @@ -1863,6 +1880,12 @@ class V8_EXPORT ValueDeserializer {
|
| Local<SharedArrayBuffer> shared_array_buffer);
|
|
|
| /*
|
| + * Similar to TransferArrayBuffer, but for IDs obtained from
|
| + * |GetLongStringId|.
|
| + */
|
| + void TransferLongString(uint32_t id, Local<String> string);
|
| +
|
| + /*
|
| * Must be called before ReadHeader to enable support for reading the legacy
|
| * wire format (i.e., which predates this being shipped).
|
| *
|
|
|