summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-bluetooth-tuple-84.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www-client/chromium/files/chromium-bluetooth-tuple-84.patch')
-rw-r--r--www-client/chromium/files/chromium-bluetooth-tuple-84.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-bluetooth-tuple-84.patch b/www-client/chromium/files/chromium-bluetooth-tuple-84.patch
new file mode 100644
index 0000000..b01978c
--- /dev/null
+++ b/www-client/chromium/files/chromium-bluetooth-tuple-84.patch
@@ -0,0 +1,51 @@
+From ded9cf966b7a9b1986bd420866f7cec74e3c2eff Mon Sep 17 00:00:00 2001
+From: David Lechner <david@pybricks.com>
+Date: Tue, 09 Jun 2020 11:15:09 -0500
+Subject: [PATCH] [bluetooth] fix compile error in dbus fake bluetooth device client
+
+This fixes a compile error that was accidentally introduced in
+https://crrev.com/2191232. For unknown reasons this does not cause a
+compile error with libc++, which is normally used with chromium, but
+does cause an error with stdlibc++.
+
+The API for preparing write requests was not changed in
+https://crrev.com/2191232, so the change that introduced this error
+was incorrect anyway. This reverts the change that introduced the
+error and adds the kTypeRequest argument to the call to WriteValue()
+since that was the API that was actually changed in the prior CL.
+
+Bug: 1092470
+Change-Id: I6f6fe90ab42aea3db8cac95b69aee5095ea33b31
+---
+
+diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.cc b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
+index f7136af..23c5fe3 100644
+--- a/device/bluetooth/dbus/fake_bluetooth_device_client.cc
++++ b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
+@@ -649,10 +649,9 @@
+ for (const auto& prepare_write_request : prepare_write_requests_) {
+ bluez::BluezDBusManager::Get()
+ ->GetBluetoothGattCharacteristicClient()
+- ->WriteValue(std::get<0>(prepare_write_request),
+- std::get<1>(prepare_write_request),
+- std::get<2>(prepare_write_request), base::DoNothing(),
+- base::DoNothing());
++ ->WriteValue(prepare_write_request.first, prepare_write_request.second,
++ bluetooth_gatt_characteristic::kTypeRequest,
++ base::DoNothing(), base::DoNothing());
+ }
+ prepare_write_requests_.clear();
+ std::move(callback).Run();
+diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.h b/device/bluetooth/dbus/fake_bluetooth_device_client.h
+index b46715b5..98a9676 100644
+--- a/device/bluetooth/dbus/fake_bluetooth_device_client.h
++++ b/device/bluetooth/dbus/fake_bluetooth_device_client.h
+@@ -384,7 +384,7 @@
+ bool delay_start_discovery_;
+
+ // Pending prepare write requests.
+- std::vector<std::tuple<dbus::ObjectPath, std::vector<uint8_t>, std::string>>
++ std::vector<std::pair<dbus::ObjectPath, std::vector<uint8_t>>>
+ prepare_write_requests_;
+
+ bool should_leave_connections_pending_;