| Index: base/win/scoped_comptr.h
|
| diff --git a/base/win/scoped_comptr.h b/base/win/scoped_comptr.h
|
| index 3d05a3b7d2e2e5d98fdef066fa1e721b8ed34157..ac704e095347e688fb4d55fc5390955001d84fe0 100644
|
| --- a/base/win/scoped_comptr.h
|
| +++ b/base/win/scoped_comptr.h
|
| @@ -46,7 +46,7 @@ class ScopedComPtr {
|
| static_assert(
|
| sizeof(ScopedComPtr<Interface, interface_id>) == sizeof(Interface*),
|
| "ScopedComPtrSize");
|
| - Release();
|
| + Reset();
|
| }
|
|
|
| Interface* get() const { return ptr_; }
|
| @@ -57,12 +57,14 @@ class ScopedComPtr {
|
| // ScopedComPtr instance.
|
| // Note that this function equates to IUnknown::Release and should not
|
| // be confused with e.g. unique_ptr::release().
|
| - void Release() {
|
| + unsigned long Reset() {
|
| + unsigned long ref = 0;
|
| Interface* temp = ptr_;
|
| if (temp) {
|
| ptr_ = nullptr;
|
| - temp->Release();
|
| + ref = temp->Release();
|
| }
|
| + return ref;
|
| }
|
|
|
| // Sets the internal pointer to NULL and returns the held object without
|
|
|