| Index: base/memory/ref_counted_memory.cc
|
| diff --git a/base/memory/ref_counted_memory.cc b/base/memory/ref_counted_memory.cc
|
| index 7bbd3171ca5f6be3db744882b88106575c6df2cc..26b78f3663231b792dee84989fe258dcf5942c02 100644
|
| --- a/base/memory/ref_counted_memory.cc
|
| +++ b/base/memory/ref_counted_memory.cc
|
| @@ -38,9 +38,9 @@ RefCountedBytes::RefCountedBytes(const std::vector<unsigned char>& initializer)
|
| RefCountedBytes::RefCountedBytes(const unsigned char* p, size_t size)
|
| : data_(p, p + size) {}
|
|
|
| -RefCountedBytes* RefCountedBytes::TakeVector(
|
| +scoped_refptr<RefCountedBytes> RefCountedBytes::TakeVector(
|
| std::vector<unsigned char>* to_destroy) {
|
| - RefCountedBytes* bytes = new RefCountedBytes;
|
| + scoped_refptr<RefCountedBytes> bytes(new RefCountedBytes);
|
| bytes->data_.swap(*to_destroy);
|
| return bytes;
|
| }
|
|
|