#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "mojo/public/cpp/bindings/lib/buffer.h"
#include <cstring>
#include <tuple>
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/numerics/safe_math.h"
#include "mojo/public/c/system/message_pipe.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
namespace mojo {
namespace internal {
Buffer::Buffer() = default;
Buffer::Buffer(void* data, size_t size, size_t cursor)
: … { … }
Buffer::Buffer(MessageHandle message,
size_t message_payload_size,
void* data,
size_t size)
: … { … }
Buffer::Buffer(Buffer&& other) { … }
Buffer::~Buffer() = default;
Buffer& Buffer::operator=(Buffer&& other) { … }
size_t Buffer::Allocate(size_t num_bytes) { … }
bool Buffer::AttachHandles(std::vector<ScopedHandle>* handles) { … }
void Buffer::Seal() { … }
void Buffer::Reset() { … }
}
}