void Run() override { MOZ_ASSERT(GetIO()->IsConsumerThread()); if (IsCanceled()) { return; } BluetoothSocketIO* io = GetIO(); if (io->IsShutdownOnConsumerThread()) { return; } io->ClearDelayedConnectTask(); io->GetIOLoop()->PostTask(FROM_HERE, new ConnectTask(io)); }
void Run() override { BluetoothSocketIO* io = SocketTask<BluetoothSocketIO>::GetIO(); MOZ_ASSERT(io->IsConsumerThread()); if (NS_WARN_IF(io->IsShutdownOnConsumerThread())) { // Since we've already explicitly closed and the close // happened before this, this isn't really an error. return; } BluetoothSocket* bluetoothSocket = io->GetBluetoothSocket(); MOZ_ASSERT(bluetoothSocket); bluetoothSocket->ReceiveSocketData(mBuffer); }
NS_IMETHOD Run() override { MOZ_ASSERT(GetIO()->IsConsumerThread()); if (IsCanceled()) { return NS_OK; } BluetoothSocketIO* io = GetIO(); if (io->IsShutdownOnConsumerThread()) { return NS_OK; } io->ClearDelayedConnectTask(); io->GetIOLoop()->PostTask(MakeAndAddRef<ConnectTask>(io)); return NS_OK; }