Commit 98eb9a73 authored by Doug Turner's avatar Doug Turner Committed by Commit Bot

WebBluetooth - Remove unneeded pre-finalizer in renderer bluetooth.cc

Bug: 916654
Change-Id: I70e2f99d558c797b0d1d98cb543fdc13c866e091
Reviewed-on: https://chromium-review.googlesource.com/c/1394374Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Doug Turner <dougt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619869}
parent ee93710e
......@@ -343,10 +343,6 @@ void Bluetooth::ContextDestroyed(ExecutionContext*) {
client_bindings_.CloseAllBindings();
}
void Bluetooth::Dispose() {
DCHECK(client_bindings_.empty());
}
void Bluetooth::Trace(blink::Visitor* visitor) {
visitor->Trace(device_instance_map_);
EventTargetWithInlineData::Trace(visitor);
......@@ -356,6 +352,10 @@ void Bluetooth::Trace(blink::Visitor* visitor) {
Bluetooth::Bluetooth(ExecutionContext* context)
: ContextLifecycleObserver(context) {}
Bluetooth::~Bluetooth() {
DCHECK(client_bindings_.empty());
}
BluetoothDevice* Bluetooth::GetBluetoothDeviceRepresentingDevice(
mojom::blink::WebBluetoothDevicePtr device_ptr,
ExecutionContext* context) {
......
......@@ -22,7 +22,6 @@ class ScriptState;
class Bluetooth final : public EventTargetWithInlineData,
public ContextLifecycleObserver,
public mojom::blink::WebBluetoothScanClient {
USING_PRE_FINALIZER(Bluetooth, Dispose);
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(Bluetooth);
......@@ -32,6 +31,7 @@ class Bluetooth final : public EventTargetWithInlineData,
}
explicit Bluetooth(ExecutionContext*);
~Bluetooth() override;
// IDL exposed interface:
ScriptPromise requestDevice(ScriptState*,
......@@ -57,10 +57,6 @@ class Bluetooth final : public EventTargetWithInlineData,
// ContextLifecycleObserver interface.
void ContextDestroyed(ExecutionContext*) override;
// USING_PRE_FINALIZER interface.
// Called before the object gets garbage collected.
void Dispose();
DEFINE_ATTRIBUTE_EVENT_LISTENER(advertisementreceived,
kAdvertisementreceived);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment