diff --git a/src/node_messaging.h b/src/node_messaging.h index 429a5646b8ada4..799bece3cbd517 100644 --- a/src/node_messaging.h +++ b/src/node_messaging.h @@ -107,6 +107,9 @@ class Message : public MemoryRetainer { private: MallocedBuffer main_message_buf_; + // TODO(addaleax): Make this a std::variant to save storage size in the common + // case (which is that all of these vectors are empty) once that is available + // with C++17. std::vector> array_buffers_; std::vector> shared_array_buffers_; std::vector> transferables_; @@ -202,6 +205,9 @@ class MessagePortData : public TransferData { // This mutex protects all fields below it, with the exception of // sibling_. mutable Mutex mutex_; + // TODO(addaleax): Make this a std::variant + // once that is available with C++17, because std::shared_ptr comes with + // overhead that is only necessary for BroadcastChannel. std::deque> incoming_messages_; MessagePort* owner_ = nullptr; std::shared_ptr group_;