Bug 1176898 - Remove redundant DisconnectFromOwner of BluetoothDiscoveryHandle. r=btian
authorBruce Sun <brsun@mozilla.com>
Tue, 21 Jul 2015 14:09:53 +0800
changeset 254083 e5c31a5932b601d5964c98f8c5050e2cca9a68b9
parent 253982 221f20e9523eb5f8693448f077dd95796a0b648e
child 254084 4d845c2a486e02c11e5c774fc7b9cad4d658fa90
push id29088
push userryanvm@gmail.com
push dateWed, 22 Jul 2015 20:26:24 +0000
treeherdermozilla-central@1b34c4729114 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbtian
bugs1176898
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1176898 - Remove redundant DisconnectFromOwner of BluetoothDiscoveryHandle. r=btian
dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp
dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
--- a/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
@@ -504,21 +504,16 @@ BluetoothAdapter::Notify(const Bluetooth
                NS_ConvertUTF16toUTF8(aData.name()).get());
   }
 }
 
 void
 BluetoothAdapter::SetDiscoveryHandleInUse(
   BluetoothDiscoveryHandle* aDiscoveryHandle)
 {
-  // Stop discovery handle in use from listening to "DeviceFound" signal
-  if (mDiscoveryHandleInUse) {
-    mDiscoveryHandleInUse->DisconnectFromOwner();
-  }
-
   mDiscoveryHandleInUse = aDiscoveryHandle;
 }
 
 void
 BluetoothAdapter::AppendLeScanHandle(
   BluetoothDiscoveryHandle* aDiscoveryHandle)
 {
   mLeScanHandleArray.AppendElement(aDiscoveryHandle);
--- a/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp
@@ -38,22 +38,16 @@ BluetoothDiscoveryHandle::BluetoothDisco
 {
   MOZ_ASSERT(aWindow);
 }
 
 BluetoothDiscoveryHandle::~BluetoothDiscoveryHandle()
 {
 }
 
-void
-BluetoothDiscoveryHandle::DisconnectFromOwner()
-{
-  DOMEventTargetHelper::DisconnectFromOwner();
-}
-
 // static
 already_AddRefed<BluetoothDiscoveryHandle>
 BluetoothDiscoveryHandle::Create(nsPIDOMWindow* aWindow)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aWindow);
 
   nsRefPtr<BluetoothDiscoveryHandle> handle =
--- a/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
+++ b/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
@@ -42,18 +42,16 @@ public:
   void GetLeScanUuid(nsString& aLeScanUuid) const
   {
     aLeScanUuid = mLeScanUuid;
   }
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
-  virtual void DisconnectFromOwner() override;
-
 private:
   BluetoothDiscoveryHandle(nsPIDOMWindow* aWindow);
 
   BluetoothDiscoveryHandle(nsPIDOMWindow* aWindow,
                            const nsTArray<nsString>& aServiceUuids,
                            const nsAString& aLeScanUuid);
 
   ~BluetoothDiscoveryHandle();