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

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

Issue 1233173002: Have ScriptPromiseResolver on the Oilpan heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix webusb ScriptPromiseResolver usage Created 5 years, 4 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/BluetoothGATTCharacteristic.cpp
diff --git a/Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp b/Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp
index 3c3e73b958cbdf88b2b218b0654cb4b36d13fa53..7437c885f6f3728372998b3ad18b133913e70491 100644
--- a/Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp
+++ b/Source/modules/bluetooth/BluetoothGATTCharacteristic.cpp
@@ -34,7 +34,7 @@ ScriptPromise BluetoothGATTCharacteristic::readValue(ScriptState* scriptState)
{
WebBluetooth* webbluetooth = BluetoothSupplement::from(scriptState);
- RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
webbluetooth->readValue(m_webCharacteristic->characteristicInstanceID, new CallbackPromiseAdapter<ConvertWebVectorToArrayBuffer, BluetoothError>(resolver));
@@ -55,7 +55,7 @@ ScriptPromise BluetoothGATTCharacteristic::writeValue(ScriptState* scriptState,
if (valueVector.size() > 512)
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(InvalidModificationError, "Value can't exceed 512 bytes."));
- RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
webbluetooth->writeValue(m_webCharacteristic->characteristicInstanceID, valueVector, new CallbackPromiseAdapter<void, BluetoothError>(resolver));
« no previous file with comments | « Source/modules/bluetooth/BluetoothDevice.cpp ('k') | Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698