diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /dom/ipc/StructuredCloneData.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/ipc/StructuredCloneData.h')
-rw-r--r-- | dom/ipc/StructuredCloneData.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/dom/ipc/StructuredCloneData.h b/dom/ipc/StructuredCloneData.h index 0566a3b07f..6beba4f745 100644 --- a/dom/ipc/StructuredCloneData.h +++ b/dom/ipc/StructuredCloneData.h @@ -93,20 +93,14 @@ class SharedJSAllocatedData final { * to send a structured clone that may include blobs or transferables such as * message ports. * - To send the data, instantiate a StructuredCloneData instance and Write() - * into it like a normal structure clone. When you are ready to send the - * ClonedMessageData-bearing IPC message, use the appropriate - * BuildClonedMessageDataFor{Parent,Child,BackgroundParent,BackgroundChild} + * into it like a normal structured clone. When you are ready to send the + * ClonedMessageData-bearing IPC message, call the BuildClonedMessageData * method to populate the ClonedMessageData and then send it before your * StructuredCloneData instance is destroyed. (Buffer borrowing is used * under-the-hood to avoid duplicating the serialized data, requiring this.) - * - To receive the data, instantiate a StructuredCloneData and use the - * appropriate {Borrow,Copy,Steal}FromClonedMessageDataFor{Parent,Child, - * BackgroundParent,BackgroundChild} method. See the memory management - * section for more info. - * - * Variations: - * - If transferables are not allowed (ex: BroadcastChannel), then use the - * StructuredCloneDataNoTransfers subclass instead of StructuredCloneData. + * - To receive the data, instantiate a StructuredCloneData and then call + * the BorrowFromClonedMessageData method. See the memory management + * section for more information. * * ## Memory Management ## * @@ -135,11 +129,11 @@ class SharedJSAllocatedData final { * * 1: Specifically, in the Write() case an owning SharedJSAllocatedData is * created efficiently (by stealing from StructuredCloneHolder). The - * BuildClonedMessageDataFor* method can be called at any time and it will + * BuildClonedMessageData method can be called at any time and it will * borrow the underlying memory. While it would be even better if * SerializedStructuredCloneBuffer could hold a SharedJSAllocatedData ref, - * there's no reason you can't wait to BuildClonedMessageDataFor* until you - * need to make the IPC Send* call. + * there's no reason you can't wait to call the BuildClonedMessageData + * method until you need to make the IPC Send* call. */ class StructuredCloneData : public StructuredCloneHolder { public: |