Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: Source/modules/bluetooth/BluetoothGATTService.cpp

Issue 1148283009: bluetooth: Remove deep copying of structs by using OwnPtr. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-get-primary-service-implementation
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/bluetooth/BluetoothGATTService.cpp
diff --git a/Source/modules/bluetooth/BluetoothGATTService.cpp b/Source/modules/bluetooth/BluetoothGATTService.cpp
index 620b1bce5d390a9052d02a5dfc1e901028dadfa5..bbe5c0d7c54819e2a3362cb7e067272944072fa1 100644
--- a/Source/modules/bluetooth/BluetoothGATTService.cpp
+++ b/Source/modules/bluetooth/BluetoothGATTService.cpp
@@ -10,7 +10,7 @@
namespace blink {
-BluetoothGATTService::BluetoothGATTService(const WebBluetoothGATTService& webService)
+BluetoothGATTService::BluetoothGATTService(PassOwnPtr<WebBluetoothGATTService> webService)
: m_webService(webService)
{
}
@@ -20,8 +20,7 @@ BluetoothGATTService* BluetoothGATTService::take(ScriptPromiseResolver*, WebBlue
if (!webServiceRawPointer) {
return nullptr;
}
- OwnPtr<WebBluetoothGATTService> webService = adoptPtr(webServiceRawPointer);
- return new BluetoothGATTService(*webService);
+ return new BluetoothGATTService(adoptPtr(webServiceRawPointer));
}
void BluetoothGATTService::dispose(WebBluetoothGATTService* webService)

Powered by Google App Engine
This is Rietveld 408576698