Backout 4a9ebf972d27 (Bug 730990) because it was checked-in without superreview
authorEric Chou <echou@mozilla.com>
Fri, 04 May 2012 07:53:51 +0800
changeset 93068 3b9b9e948dcaf31f4cfca499a0cba82f69f823c4
parent 93067 7e237e96018f447364cddc97f32bd59d692fca46
child 93069 eb125cc302528defed0bc4afde5d22870f4e200f
push id22608
push useremorley@mozilla.com
push dateFri, 04 May 2012 12:47:48 +0000
treeherdermozilla-central@9ebf3dc839c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs730990
milestone15.0a1
backs out4a9ebf972d27ebc93d84529a40b0dd5dfaa36933
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
Backout 4a9ebf972d27 (Bug 730990) because it was checked-in without superreview
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/bluetooth/BluetoothDevice.cpp
dom/bluetooth/BluetoothDevice.h
dom/bluetooth/Makefile.in
dom/bluetooth/nsIDOMBluetoothDevice.idl
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -527,17 +527,16 @@ using mozilla::dom::indexedDB::IDBWrappe
 #ifdef MOZ_B2G_RIL
 #include "Telephony.h"
 #include "TelephonyCall.h"
 #include "CallEvent.h"
 #endif
 
 #ifdef MOZ_B2G_BT
 #include "BluetoothAdapter.h"
-#include "BluetoothDevice.h"
 #endif
 
 #include "DOMError.h"
 #include "DOMRequest.h"
 
 #include "mozilla/Likely.h"
 
 #undef None // something included above defines this preprocessor symbol, maybe Xlib headers
@@ -1635,18 +1634,16 @@ static nsDOMClassInfoData sClassInfoData
                            EVENTTARGET_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(CallEvent, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 #endif
 
 #ifdef MOZ_B2G_BT
   NS_DEFINE_CLASSINFO_DATA(BluetoothAdapter, nsEventTargetSH,
                            EVENTTARGET_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(BluetoothDevice, nsEventTargetSH,
-                           EVENTTARGET_SCRIPTABLE_FLAGS)
 #endif
 
   NS_DEFINE_CLASSINFO_DATA(DOMError, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(DOMRequest, nsEventTargetSH,
                            EVENTTARGET_SCRIPTABLE_FLAGS)
 };
@@ -4412,20 +4409,16 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMCallEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEvent)
   DOM_CLASSINFO_MAP_END
 #endif
 
 #ifdef MOZ_B2G_BT
   DOM_CLASSINFO_MAP_BEGIN(BluetoothAdapter, nsIDOMBluetoothAdapter)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMBluetoothAdapter)
-  DOM_CLASSINFO_MAP_END  
-  
-  DOM_CLASSINFO_MAP_BEGIN(BluetoothDevice, nsIDOMBluetoothDevice)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMBluetoothDevice)
   DOM_CLASSINFO_MAP_END
 #endif
 
   DOM_CLASSINFO_MAP_BEGIN(DOMError, nsIDOMDOMError)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMError)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(DOMRequest, nsIDOMDOMRequest)
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -542,13 +542,12 @@ DOMCI_CLASS(MozSettingsEvent)
 #ifdef MOZ_B2G_RIL
 DOMCI_CLASS(Telephony)
 DOMCI_CLASS(TelephonyCall)
 DOMCI_CLASS(CallEvent)
 #endif
 
 #ifdef MOZ_B2G_BT
 DOMCI_CLASS(BluetoothAdapter)
-DOMCI_CLASS(BluetoothDevice)
 #endif
 
 DOMCI_CLASS(DOMError)
 DOMCI_CLASS(DOMRequest)
deleted file mode 100644
--- a/dom/bluetooth/BluetoothDevice.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "BluetoothDevice.h"
-#include "nsDOMClassInfo.h"
-
-USING_BLUETOOTH_NAMESPACE
-
-DOMCI_DATA(BluetoothDevice, BluetoothDevice)
-
-NS_IMPL_CYCLE_COLLECTION_CLASS(BluetoothDevice)
-
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(BluetoothDevice,
-                                                  nsDOMEventTargetHelper)
-  NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(propertychanged)
-  NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(disconnectrequested)
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(BluetoothDevice,
-                                                nsDOMEventTargetHelper)
-  NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(propertychanged)
-  NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(disconnectrequested)
-NS_IMPL_CYCLE_COLLECTION_UNLINK_END
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothDevice)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMBluetoothDevice)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMBluetoothDevice)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(BluetoothDevice)
-NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
-
-NS_IMPL_ADDREF_INHERITED(BluetoothDevice, nsDOMEventTargetHelper)
-NS_IMPL_RELEASE_INHERITED(BluetoothDevice, nsDOMEventTargetHelper)
-
-BluetoothDevice::BluetoothDevice()
-{
-}
-
-nsresult
-BluetoothDevice::GetAdapter(nsAString& aAdapter)
-{
-  aAdapter = mAdapter;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetAddress(nsAString& aAddress)
-{
-  aAddress = mAddress;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetName(nsAString& aName)
-{
-  aName = mName;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetClass(PRUint32* aClass)
-{
-  *aClass = mClass;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetConnected(bool* aConnected)
-{
-  *aConnected = mConnected;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetPaired(bool* aPaired)
-{
-  *aPaired = mPaired;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetLegacyPairing(bool* aLegacyPairing)
-{
-  *aLegacyPairing = mLegacyPairing;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetTrusted(bool* aTrusted)
-{
-  *aTrusted = mTrusted;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::SetTrusted(bool aTrusted)
-{
-  mTrusted = aTrusted;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetAlias(nsAString& aAlias)
-{
-  aAlias = mAlias;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::SetAlias(const nsAString& aAlias)
-{
-  mAlias = aAlias;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetUuids(jsval* aUuids)
-{
-  //TODO: convert mUuids to jsval and assign to aUuids;
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::Disconnect()
-{
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::GetProperties(jsval* aProperties)
-{
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::SetProperty(const nsAString& aName, const nsAString& aValue)
-{
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::DiscoverServices(const nsAString& aPattern, jsval* aServices)
-{
-  return NS_OK;
-}
-
-nsresult
-BluetoothDevice::CancelDiscovery()
-{
-  return NS_OK;
-}
-
-NS_IMPL_EVENT_HANDLER(BluetoothDevice, propertychanged)
-NS_IMPL_EVENT_HANDLER(BluetoothDevice, disconnectrequested)
deleted file mode 100644
--- a/dom/bluetooth/BluetoothDevice.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_bluetooth_bluetoothdevice_h__
-#define mozilla_dom_bluetooth_bluetoothdevice_h__
-
-#include "BluetoothCommon.h"
-#include "nsDOMEventTargetHelper.h"
-#include "nsIDOMBluetoothDevice.h"
-#include "nsString.h"
-
-BEGIN_BLUETOOTH_NAMESPACE
-
-class BluetoothDevice : public nsDOMEventTargetHelper
-                      , public nsIDOMBluetoothDevice
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIDOMBLUETOOTHDEVICE
-
-  NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper::)
-
-  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(BluetoothDevice,
-                                           nsDOMEventTargetHelper)
-
-  BluetoothDevice();
-
-protected:
-  nsString mAdapter;
-  nsString mAddress;
-  PRUint32 mClass;
-  bool mConnected;
-  bool mLegacyPairing;
-  nsString mName;
-  bool mPaired;
-  nsTArray<nsString> mUuids;
-
-  bool mTrusted;
-  nsString mAlias;
-
-  NS_DECL_EVENT_HANDLER(propertychanged)
-  NS_DECL_EVENT_HANDLER(disconnectrequested)
-};
-
-END_BLUETOOTH_NAMESPACE
-
-#endif
--- a/dom/bluetooth/Makefile.in
+++ b/dom/bluetooth/Makefile.in
@@ -14,19 +14,17 @@ LIBRARY_NAME     = dombluetooth_s
 XPIDL_MODULE     = dom_bluetooth
 LIBXUL_LIBRARY   = 1
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/dom/dom-config.mk
 
 CPPSRCS = \
   BluetoothAdapter.cpp \
-  BluetoothDevice.cpp \
   $(NULL)
 
 XPIDLSRCS = \
   nsIDOMNavigatorBluetooth.idl \
   nsIDOMBluetoothAdapter.idl \
-  nsIDOMBluetoothDevice.idl \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
deleted file mode 100644
--- a/dom/bluetooth/nsIDOMBluetoothDevice.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsIDOMEventTarget.idl"
-
-[scriptable, builtinclass, uuid(2da61f89-a7d2-4f7d-9f4c-fb8a99d9add2)]
-interface nsIDOMBluetoothDevice : nsIDOMEventTarget
-{
-  readonly attribute DOMString adapter;
-  readonly attribute DOMString address;
-  readonly attribute unsigned long class;
-  readonly attribute boolean connected;
-  readonly attribute boolean legacyPairing;
-  readonly attribute DOMString name;
-  readonly attribute boolean paired;
-  readonly attribute jsval uuids;
-
-  attribute boolean trusted;
-  attribute DOMString alias;
-
-  attribute nsIDOMEventListener onpropertychanged;
-  attribute nsIDOMEventListener ondisconnectrequested;
-
-  void disconnect();
-  jsval getProperties();
-  void setProperty(in DOMString name, in DOMString value);
-  jsval discoverServices(in DOMString pattern);
-  void cancelDiscovery();
-};