| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3741595 commit 18f3ba3
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,6 +107,9 @@ class Message : public MemoryRetainer { | |||
| 107 | 107 | ||
| 108 | 108 | private: | |
| 109 | 109 | MallocedBuffer<char> main_message_buf_; | |
| 110 | + // TODO(addaleax): Make this a std::variant to save storage size in the common | ||
| 111 | + // case (which is that all of these vectors are empty) once that is available | ||
| 112 | + // with C++17. | ||
| 110 | 113 | std::vector<std::shared_ptr<v8::BackingStore>> array_buffers_; | |
| 111 | 114 | std::vector<std::shared_ptr<v8::BackingStore>> shared_array_buffers_; | |
| 112 | 115 | std::vector<std::unique_ptr<TransferData>> transferables_; | |
@@ -202,6 +205,9 @@ class MessagePortData : public TransferData { | |||
| 202 | 205 | // This mutex protects all fields below it, with the exception of | |
| 203 | 206 | // sibling_. | |
| 204 | 207 | mutable Mutex mutex_; | |
| 208 | + // TODO(addaleax): Make this a std::variant<std::shared_ptr, std::unique_ptr> | ||
| 209 | + // once that is available with C++17, because std::shared_ptr comes with | ||
| 210 | + // overhead that is only necessary for BroadcastChannel. | ||
| 205 | 211 | std::deque<std::shared_ptr<Message>> incoming_messages_; | |
| 206 | 212 | MessagePort* owner_ = nullptr; | |
| 207 | 213 | std::shared_ptr<SiblingGroup> group_; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments