summaryrefslogtreecommitdiffstats
path: root/mojo/system/message_in_transit.h
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/system/message_in_transit.h')
-rw-r--r--mojo/system/message_in_transit.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/mojo/system/message_in_transit.h b/mojo/system/message_in_transit.h
index d8eb07d..66f374d 100644
--- a/mojo/system/message_in_transit.h
+++ b/mojo/system/message_in_transit.h
@@ -83,11 +83,11 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
return RoundUpMessageAlignment(sizeof(Header) + header()->num_bytes);
}
const void* secondary_buffer() const {
- return (message_size_ > main_buffer_size()) ?
+ return (total_size() > main_buffer_size()) ?
static_cast<const char*>(buffer_) + main_buffer_size() : NULL;
}
size_t secondary_buffer_size() const {
- return message_size_ - main_buffer_size();
+ return total_size() - main_buffer_size();
}
size_t total_size() const { return header()->total_size; }
uint32_t num_bytes() const { return header()->num_bytes; }
@@ -103,7 +103,6 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
private:
const Header* header() const { return static_cast<const Header*>(buffer_); }
- const size_t message_size_;
const void* const buffer_;
// Though this struct is trivial, disallow copy and assign, since it doesn't