| Index: mojo/public/cpp/bindings/message.h
|
| diff --git a/mojo/public/cpp/bindings/message.h b/mojo/public/cpp/bindings/message.h
|
| index b8298360b0d1c3971c0df620bff824c1ec5bb9b5..beb1cd9036ffb45a9e53f46b2ce7ee059974617a 100644
|
| --- a/mojo/public/cpp/bindings/message.h
|
| +++ b/mojo/public/cpp/bindings/message.h
|
| @@ -63,6 +63,10 @@ class Message {
|
| uint8_t* mutable_payload() {
|
| return reinterpret_cast<uint8_t*>(data_) + data_->header.num_bytes;
|
| }
|
| + uint32_t payload_num_bytes() const {
|
| + assert(data_num_bytes_ >= data_->header.num_bytes);
|
| + return data_num_bytes_ - data_->header.num_bytes;
|
| + }
|
|
|
| // Access the handles.
|
| const std::vector<Handle>* handles() const { return &handles_; }
|
|
|