| Index: net/base/io_buffer.cc
|
| diff --git a/net/base/io_buffer.cc b/net/base/io_buffer.cc
|
| index dfd4d38fbdddd3dde4b3f90bebb917d49f874d77..7e5a1fe9822ae77dbf79457eb7fa69425a559851 100644
|
| --- a/net/base/io_buffer.cc
|
| +++ b/net/base/io_buffer.cc
|
| @@ -52,11 +52,6 @@ DrainableIOBuffer::DrainableIOBuffer(IOBuffer* base, int size)
|
| used_(0) {
|
| }
|
|
|
| -DrainableIOBuffer::~DrainableIOBuffer() {
|
| - // The buffer is owned by the |base_| instance.
|
| - data_ = NULL;
|
| -}
|
| -
|
| void DrainableIOBuffer::DidConsume(int bytes) {
|
| SetOffset(used_ + bytes);
|
| }
|
| @@ -76,16 +71,17 @@ void DrainableIOBuffer::SetOffset(int bytes) {
|
| data_ = base_->data() + used_;
|
| }
|
|
|
| +DrainableIOBuffer::~DrainableIOBuffer() {
|
| + // The buffer is owned by the |base_| instance.
|
| + data_ = NULL;
|
| +}
|
| +
|
| GrowableIOBuffer::GrowableIOBuffer()
|
| : IOBuffer(),
|
| capacity_(0),
|
| offset_(0) {
|
| }
|
|
|
| -GrowableIOBuffer::~GrowableIOBuffer() {
|
| - data_ = NULL;
|
| -}
|
| -
|
| void GrowableIOBuffer::SetCapacity(int capacity) {
|
| DCHECK(capacity >= 0);
|
| // realloc will crash if it fails.
|
| @@ -111,14 +107,17 @@ char* GrowableIOBuffer::StartOfBuffer() {
|
| return real_data_.get();
|
| }
|
|
|
| -PickledIOBuffer::PickledIOBuffer() : IOBuffer() {}
|
| +GrowableIOBuffer::~GrowableIOBuffer() {
|
| + data_ = NULL;
|
| +}
|
|
|
| -PickledIOBuffer::~PickledIOBuffer() { data_ = NULL; }
|
| +PickledIOBuffer::PickledIOBuffer() : IOBuffer() {}
|
|
|
| void PickledIOBuffer::Done() {
|
| data_ = const_cast<char*>(static_cast<const char*>(pickle_.data()));
|
| }
|
|
|
| +PickledIOBuffer::~PickledIOBuffer() { data_ = NULL; }
|
|
|
| WrappedIOBuffer::WrappedIOBuffer(const char* data)
|
| : IOBuffer(const_cast<char*>(data)) {
|
|
|