diff options
author | dcheng <dcheng@chromium.org> | 2016-03-08 15:17:29 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-08 23:24:12 +0000 |
commit | 9fd4ab64bd402859ccea0c5213b0a478f9d6ae5a (patch) | |
tree | 0705bff240c7bcb0ee53845ff45f61812ff372b4 /device | |
parent | 97d372c2bc6233832ee573db666579ea15209430 (diff) | |
download | chromium_src-9fd4ab64bd402859ccea0c5213b0a478f9d6ae5a.zip chromium_src-9fd4ab64bd402859ccea0c5213b0a478f9d6ae5a.tar.gz chromium_src-9fd4ab64bd402859ccea0c5213b0a478f9d6ae5a.tar.bz2 |
Change scoped_ptr to a type alias for std::unique_ptr on OS_WIN
This also removes the infinite recursion part of the ReferenceCycle test.
While it's nice not to crash like this, [unique.ptr.single.dtor] doesn't
actually require ~unique_ptr to reset the stored pointer to nullptr on
destruction. Thus, infinite recursion, while not useful, is allowed per
the spec.
BUG=554298,579269
Review URL: https://codereview.chromium.org/1763983002
Cr-Commit-Position: refs/heads/master@{#379962}
Diffstat (limited to 'device')
-rw-r--r-- | device/bluetooth/bluetooth_remote_gatt_service_win.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_win.cc b/device/bluetooth/bluetooth_remote_gatt_service_win.cc index 19064eb..84127ed 100644 --- a/device/bluetooth/bluetooth_remote_gatt_service_win.cc +++ b/device/bluetooth/bluetooth_remote_gatt_service_win.cc @@ -250,6 +250,10 @@ void BluetoothRemoteGattServiceWin::RemoveIncludedCharacteristic( void BluetoothRemoteGattServiceWin::ClearIncludedCharacteristics() { discovery_completed_included_charateristics_.clear(); + // Explicitly reset to null to ensure that calling GetCharacteristic() on the + // removed characteristic in GattDescriptorRemoved() returns null. + for (auto& entry : included_characteristics_) + entry.second.reset(); included_characteristics_.clear(); } |