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

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

Issue 2362173002: Clear Document::m_frame after dispatching ContextLifecycleObesrver::contextDestroyed (Closed)
Patch Set: temp Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
index e3ca6e56b2d292739f60d3d445d3ee4075920c14..cbfd0e411a0a3aace66bbb22e467c506dd9e7244 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp
@@ -18,7 +18,7 @@
namespace blink {
BluetoothDevice::BluetoothDevice(ExecutionContext* context, std::unique_ptr<WebBluetoothDeviceInit> webDevice)
- : ActiveDOMObject(context)
+ : ContextLifecycleObserver(context)
, m_webDevice(std::move(webDevice))
, m_gatt(BluetoothRemoteGATTServer::create(this))
{
@@ -29,9 +29,7 @@ BluetoothDevice::BluetoothDevice(ExecutionContext* context, std::unique_ptr<WebB
BluetoothDevice* BluetoothDevice::take(ScriptPromiseResolver* resolver, std::unique_ptr<WebBluetoothDeviceInit> webDevice)
{
ASSERT(webDevice);
- BluetoothDevice* device = new BluetoothDevice(resolver->getExecutionContext(), std::move(webDevice));
- device->suspendIfNeeded();
- return device;
+ return new BluetoothDevice(resolver->getExecutionContext(), std::move(webDevice));
}
void BluetoothDevice::dispose()
@@ -39,7 +37,7 @@ void BluetoothDevice::dispose()
disconnectGATTIfConnected();
}
-void BluetoothDevice::stop()
+void BluetoothDevice::contextDestroyed()
{
disconnectGATTIfConnected();
}
@@ -62,7 +60,7 @@ const WTF::AtomicString& BluetoothDevice::interfaceName() const
ExecutionContext* BluetoothDevice::getExecutionContext() const
{
- return ActiveDOMObject::getExecutionContext();
+ return ContextLifecycleObserver::getExecutionContext();
}
void BluetoothDevice::dispatchGattServerDisconnected()
@@ -77,7 +75,7 @@ void BluetoothDevice::dispatchGattServerDisconnected()
DEFINE_TRACE(BluetoothDevice)
{
EventTargetWithInlineData::trace(visitor);
- ActiveDOMObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
visitor->trace(m_gatt);
}
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698