@@ -135,11 +135,11 @@ class BaseObject : public MemoryRetainer {
135
135
// method of MessagePorts (and, by extension, Workers).
136
136
// GetTransferMode() returns a transfer mode that indicates how to deal with
137
137
// the current object:
138
- // - kUntransferable :
139
- // No transfer is possible, either because this type of BaseObject does
140
- // not know how to be transferred, or because it is not in a state in
141
- // which it is possible to do so (e.g. because it has already been
142
- // transferred).
138
+ // - kUncloneable :
139
+ // No transfer or clone is possible, either because this type of
140
+ // BaseObject does not know how to be transferred, or because it is not
141
+ // in a state in which it is possible to do so (e.g. because it has
142
+ // already been transferred).
143
143
// - kTransferable:
144
144
// This object can be transferred in a destructive fashion, i.e. will be
145
145
// rendered unusable on the sending side of the channel in the process
@@ -160,11 +160,7 @@ class BaseObject : public MemoryRetainer {
160
160
// After a successful clone, FinalizeTransferRead() is called on the receiving
161
161
// end, and can read deserialize JS data possibly serialized by a previous
162
162
// FinalizeTransferWrite() call.
163
- enum class TransferMode {
164
- kUntransferable ,
165
- kTransferable ,
166
- kCloneable
167
- };
163
+ enum class TransferMode : uint8_t { kUncloneable , kTransferable , kCloneable };
168
164
virtual TransferMode GetTransferMode () const ;
169
165
virtual std::unique_ptr<worker::TransferData> TransferForMessaging ();
170
166
virtual std::unique_ptr<worker::TransferData> CloneForMessaging () const ;
0 commit comments