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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp

Issue 2433773006: Remove ExecutionContext::activeDOMObjectsAreStopped()
Patch Set: Created 4 years, 2 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: 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 c92a061a325740853622742149e7dd9f1518653e..005aba35c3fd4afab1176297978b81a9ebc74686 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
@@ -122,8 +122,7 @@ class ReadValueCallback : public WebBluetoothReadValueCallbacks {
: m_webCharacteristic(characteristic), m_resolver(resolver) {}
void onSuccess(const WebVector<uint8_t>& value) override {
- if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ if (!m_resolver->getExecutionContext())
return;
DOMDataView* domDataView = ConvertWebVectorToDataView(value);
@@ -137,8 +136,7 @@ class ReadValueCallback : public WebBluetoothReadValueCallbacks {
int32_t
error /* Corresponds to WebBluetoothResult in web_bluetooth.mojom */)
override {
- if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ if (!m_resolver->getExecutionContext())
return;
m_resolver->reject(BluetoothError::take(m_resolver, error));
}
@@ -168,8 +166,7 @@ class WriteValueCallback : public WebBluetoothWriteValueCallbacks {
: m_webCharacteristic(characteristic), m_resolver(resolver) {}
void onSuccess(const WebVector<uint8_t>& value) override {
- if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ if (!m_resolver->getExecutionContext())
return;
if (m_webCharacteristic) {
@@ -182,8 +179,7 @@ class WriteValueCallback : public WebBluetoothWriteValueCallbacks {
int32_t
error /* Corresponds to WebBluetoothResult in web_bluetooth.mojom */)
override {
- if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ if (!m_resolver->getExecutionContext())
return;
m_resolver->reject(BluetoothError::take(m_resolver, error));
}
@@ -228,8 +224,7 @@ class NotificationsCallback : public WebBluetoothNotificationsCallbacks {
: m_webCharacteristic(characteristic), m_resolver(resolver) {}
void onSuccess() override {
- if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ if (!m_resolver->getExecutionContext())
return;
m_resolver->resolve(m_webCharacteristic);
@@ -239,8 +234,7 @@ class NotificationsCallback : public WebBluetoothNotificationsCallbacks {
int32_t
error /* Corresponds to WebBluetoothResult in web_bluetooth.mojom */)
override {
- if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ if (!m_resolver->getExecutionContext())
return;
m_resolver->reject(BluetoothError::take(m_resolver, error));
}

Powered by Google App Engine
This is Rietveld 408576698