| Index: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
|
| diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
|
| index 53c3f395aa3b4b0021ccd28df17de8b7c31a179e..1177d433d2343380f65a46325157c8119712f8ab 100644
|
| --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
|
| +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
|
| @@ -4,7 +4,6 @@
|
|
|
| #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h"
|
|
|
| -#include "bindings/core/v8/CallbackPromiseAdapter.h"
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "bindings/core/v8/ScriptPromiseResolver.h"
|
| #include "core/dom/DOMDataView.h"
|
| @@ -52,17 +51,15 @@ BluetoothRemoteGATTCharacteristic::BluetoothRemoteGATTCharacteristic(
|
| ThreadState::current()->registerPreFinalizer(this);
|
| }
|
|
|
| -BluetoothRemoteGATTCharacteristic* BluetoothRemoteGATTCharacteristic::take(
|
| - ScriptPromiseResolver* resolver,
|
| +BluetoothRemoteGATTCharacteristic* BluetoothRemoteGATTCharacteristic::create(
|
| + ExecutionContext* context,
|
| std::unique_ptr<WebBluetoothRemoteGATTCharacteristicInit> webCharacteristic,
|
| BluetoothRemoteGATTService* service) {
|
| - if (!webCharacteristic) {
|
| - return nullptr;
|
| - }
|
| + DCHECK(webCharacteristic);
|
| +
|
| BluetoothRemoteGATTCharacteristic* characteristic =
|
| - new BluetoothRemoteGATTCharacteristic(resolver->getExecutionContext(),
|
| - std::move(webCharacteristic),
|
| - service);
|
| + new BluetoothRemoteGATTCharacteristic(
|
| + context, std::move(webCharacteristic), service);
|
| // See note in ActiveDOMObject about suspendIfNeeded.
|
| characteristic->suspendIfNeeded();
|
| return characteristic;
|
|
|