Bug 733652 - Remove geolocation address handling (v2). Little adoption, costly implementation r=jdm
authorDoug Turner <dougt@dougt.org>
Thu, 08 Mar 2012 22:16:25 -0800
changeset 92303 691063f2a50eccb9ef6ffdfe4a573e2f8dbf9cea
parent 92302 9e65814f61deefdeecce2b5c40f3ef0de3e59273
child 92304 dad95ee47df27f5d2f9109380d0c746b0bbc053d
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs733652
milestone14.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 733652 - Remove geolocation address handling (v2). Little adoption, costly implementation r=jdm
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/interfaces/geolocation/Makefile.in
dom/interfaces/geolocation/nsIDOMGeoPosition.idl
dom/interfaces/geolocation/nsIDOMGeoPositionAddress.idl
dom/src/geolocation/nsGeoPosition.cpp
dom/src/geolocation/nsGeoPosition.h
dom/src/geolocation/nsGeoPositionIPCSerialiser.h
embedding/android/GeckoEvent.java
embedding/android/GeckoSurfaceView.java
mobile/android/base/GeckoApp.java
mobile/android/base/GeckoEvent.java
widget/android/AndroidJavaWrappers.cpp
widget/android/AndroidJavaWrappers.h
widget/android/nsAppShell.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -1417,19 +1417,16 @@ static nsDOMClassInfoData sClassInfoData
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   
   NS_DEFINE_CLASSINFO_DATA(GeoPosition, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS) 
   
   NS_DEFINE_CLASSINFO_DATA(GeoPositionCoords, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
-  NS_DEFINE_CLASSINFO_DATA(GeoPositionAddress, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
-
   NS_DEFINE_CLASSINFO_DATA(GeoPositionError, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(MozBatteryManager, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(MozPowerManager, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
@@ -4015,20 +4012,16 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_BEGIN(GeoPosition, nsIDOMGeoPosition)
      DOM_CLASSINFO_MAP_ENTRY(nsIDOMGeoPosition)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(GeoPositionCoords, nsIDOMGeoPositionCoords)
      DOM_CLASSINFO_MAP_ENTRY(nsIDOMGeoPositionCoords)
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(GeoPositionAddress, nsIDOMGeoPositionAddress)
-     DOM_CLASSINFO_MAP_ENTRY(nsIDOMGeoPositionAddress)
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(GeoPositionError, nsIDOMGeoPositionError)
      DOM_CLASSINFO_MAP_ENTRY(nsIDOMGeoPositionError)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(MozBatteryManager, nsIDOMMozBatteryManager)
      DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozBatteryManager)
      DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
   DOM_CLASSINFO_MAP_END
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -417,17 +417,16 @@ DOMCI_CLASS(DataContainerEvent)
 // event used for cross-domain message-passing and for server-sent events in
 // HTML5
 DOMCI_CLASS(MessageEvent)
 
 // Geolocation
 DOMCI_CLASS(GeoGeolocation)
 DOMCI_CLASS(GeoPosition)
 DOMCI_CLASS(GeoPositionCoords)
-DOMCI_CLASS(GeoPositionAddress)
 DOMCI_CLASS(GeoPositionError)
 
 DOMCI_CLASS(MozBatteryManager)
 
 DOMCI_CLASS(MozPowerManager)
 DOMCI_CLASS(MozWakeLock)
 
 DOMCI_CLASS(MozSmsManager)
--- a/dom/interfaces/geolocation/Makefile.in
+++ b/dom/interfaces/geolocation/Makefile.in
@@ -44,17 +44,16 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULE         = dom
 XPIDL_MODULE   = dom_geolocation
 GRE_MODULE     = 1
 
 XPIDLSRCS =                                    \
             nsIDOMGeoGeolocation.idl           \
             nsIDOMGeoPosition.idl              \
-            nsIDOMGeoPositionAddress.idl       \
             nsIDOMGeoPositionCoords.idl        \
             nsIDOMGeoPositionCallback.idl      \
             nsIDOMGeoPositionError.idl         \
             nsIDOMGeoPositionErrorCallback.idl \
             nsIDOMGeoPositionOptions.idl       \
             nsIDOMNavigatorGeolocation.idl     \
             $(NULL)
 
--- a/dom/interfaces/geolocation/nsIDOMGeoPosition.idl
+++ b/dom/interfaces/geolocation/nsIDOMGeoPosition.idl
@@ -32,18 +32,15 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 
 #include "domstubs.idl"
 #include "nsIDOMGeoPositionCoords.idl"
-#include "nsIDOMGeoPositionAddress.idl"
 
-[scriptable, uuid(23E5269F-4DD7-41C4-B52A-75918694C2DE)]
+[scriptable, uuid(dd9f7e81-0f74-4fb5-b361-37019bf60c3f)]
 interface nsIDOMGeoPosition : nsISupports
 {
   readonly attribute DOMTimeStamp timestamp;
   readonly attribute nsIDOMGeoPositionCoords coords;
-  readonly attribute nsIDOMGeoPositionAddress address;
-
 };
deleted file mode 100644
--- a/dom/interfaces/geolocation/nsIDOMGeoPositionAddress.idl
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Geolocation.
- *
- * The Initial Developer of the Original Code is Mozilla Foundation
- * Portions created by the Initial Developer are Copyright (C) 2008
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Doug Turner <dougt@meer.net>  (Original Author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#include "domstubs.idl"
-
-[scriptable, uuid(93abae10-7024-49eb-8e05-1931343b0ebb)]
-interface nsIDOMGeoPositionAddress : nsISupports
-{
-  readonly attribute DOMString streetNumber;
-  readonly attribute DOMString street;
-  readonly attribute DOMString premises;
-  readonly attribute DOMString city;
-  readonly attribute DOMString county;
-  readonly attribute DOMString region;
-  readonly attribute DOMString country;
-  readonly attribute DOMString postalCode;
-};
--- a/dom/src/geolocation/nsGeoPosition.cpp
+++ b/dom/src/geolocation/nsGeoPosition.cpp
@@ -36,110 +36,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsGeoPosition.h"
 #include "nsDOMClassInfoID.h"
 
 ////////////////////////////////////////////////////
-// nsGeoPositionAddress
-////////////////////////////////////////////////////
-
-nsGeoPositionAddress::nsGeoPositionAddress(const nsAString &aStreetNumber,
-                                           const nsAString &aStreet,
-                                           const nsAString &aPremises,
-                                           const nsAString &aCity,
-                                           const nsAString &aCounty,
-                                           const nsAString &aRegion,
-                                           const nsAString &aCountry,
-                                           const nsAString &aPostalCode)
-    : mStreetNumber(aStreetNumber)
-    , mStreet(aStreet)
-    , mPremises(aPremises)
-    , mCity(aCity)
-    , mCounty(aCounty)
-    , mRegion(aRegion)
-    , mCountry(aCountry)
-    , mPostalCode(aPostalCode)
-{
-}
-
-nsGeoPositionAddress::~nsGeoPositionAddress()
-{
-}
-
-DOMCI_DATA(GeoPositionAddress, nsGeoPositionAddress)
-
-NS_INTERFACE_MAP_BEGIN(nsGeoPositionAddress)
-NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMGeoPositionAddress)
-NS_INTERFACE_MAP_ENTRY(nsIDOMGeoPositionAddress)
-NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(GeoPositionAddress)
-NS_INTERFACE_MAP_END
-
-NS_IMPL_THREADSAFE_ADDREF(nsGeoPositionAddress)
-NS_IMPL_THREADSAFE_RELEASE(nsGeoPositionAddress)
-
-NS_IMETHODIMP
-nsGeoPositionAddress::GetStreetNumber(nsAString & aStreetNumber)
-{
-  aStreetNumber = mStreetNumber;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGeoPositionAddress::GetStreet(nsAString & aStreet)
-{
-  aStreet = mStreet;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGeoPositionAddress::GetPremises(nsAString & aPremises)
-{
-  aPremises = mPremises;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGeoPositionAddress::GetCity(nsAString & aCity)
-{
-  aCity = mCity;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGeoPositionAddress::GetCounty(nsAString & aCounty)
-{
-  aCounty = mCounty;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGeoPositionAddress::GetRegion(nsAString & aRegion)
-{
-  aRegion = mRegion;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGeoPositionAddress::GetCountry(nsAString & aCountry)
-{
-  aCountry = mCountry;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGeoPositionAddress::GetPostalCode(nsAString & aPostalCode)
-{
-  aPostalCode = mPostalCode;
-  return NS_OK;
-}
-
-////////////////////////////////////////////////////
 // nsGeoPositionCoords
 ////////////////////////////////////////////////////
 nsGeoPositionCoords::nsGeoPositionCoords(double aLat, double aLong,
                                          double aAlt, double aHError,
                                          double aVError, double aHeading,
                                          double aSpeed)
   : mLat(aLat)
   , mLong(aLong)
@@ -234,21 +140,19 @@ nsGeoPosition::nsGeoPosition(double aLat
 nsGeoPosition::nsGeoPosition(nsIDOMGeoPositionCoords *aCoords,
                              long long aTimestamp) :
     mTimestamp(aTimestamp),
     mCoords(aCoords)
 {
 }
 
 nsGeoPosition::nsGeoPosition(nsIDOMGeoPositionCoords *aCoords,
-                             nsIDOMGeoPositionAddress *aAddress,
                              DOMTimeStamp aTimestamp) :
   mTimestamp(aTimestamp),
-  mCoords(aCoords),
-  mAddress(aAddress)
+  mCoords(aCoords)
 {
 }
 
 nsGeoPosition::~nsGeoPosition()
 {
 }
 
 DOMCI_DATA(GeoPosition, nsGeoPosition)
@@ -270,16 +174,8 @@ nsGeoPosition::GetTimestamp(DOMTimeStamp
 }
 
 NS_IMETHODIMP
 nsGeoPosition::GetCoords(nsIDOMGeoPositionCoords * *aCoords)
 {
   NS_IF_ADDREF(*aCoords = mCoords);
   return NS_OK;
 }
-
-NS_IMETHODIMP
-nsGeoPosition::GetAddress(nsIDOMGeoPositionAddress** aAddress)
-{
-  NS_IF_ADDREF(*aAddress = mAddress);
-  return NS_OK;
-}
-
--- a/dom/src/geolocation/nsGeoPosition.h
+++ b/dom/src/geolocation/nsGeoPosition.h
@@ -38,53 +38,21 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef nsGeoPosition_h
 #define nsGeoPosition_h
 
 #include "nsAutoPtr.h"
 #include "nsIClassInfo.h"
 #include "nsDOMClassInfoID.h"
-#include "nsIDOMGeoPositionAddress.h"
 #include "nsIDOMGeoPositionCoords.h"
 #include "nsIDOMGeoPosition.h"
 #include "nsString.h"
 
 ////////////////////////////////////////////////////
-// nsGeoPositionAddress
-////////////////////////////////////////////////////
-
-class nsGeoPositionAddress : public nsIDOMGeoPositionAddress
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIDOMGEOPOSITIONADDRESS
-
-  nsGeoPositionAddress( const nsAString &aStreetNumber,
-                        const nsAString &aStreet,
-                        const nsAString &aPremises,
-                        const nsAString &aCity,
-                        const nsAString &aCounty,
-                        const nsAString &aRegion,
-                        const nsAString &aCountry,
-                        const nsAString &aPostalCode);
-
-    ~nsGeoPositionAddress();
-  private:
-    const nsString mStreetNumber;
-    const nsString mStreet;
-    const nsString mPremises;
-    const nsString mCity;
-    const nsString mCounty;
-    const nsString mRegion;
-    const nsString mCountry;
-    const nsString mPostalCode;
-};
-
-////////////////////////////////////////////////////
 // nsGeoPositionCoords
 ////////////////////////////////////////////////////
 
 /**
  * Simple object that holds a single point in space.
  */
 class nsGeoPositionCoords MOZ_FINAL : public nsIDOMGeoPositionCoords
 {
@@ -117,24 +85,18 @@ public:
                 double aVError, double aHeading,
                 double aSpeed, long long aTimestamp);
   
 
   nsGeoPosition(nsIDOMGeoPositionCoords *aCoords,
                 long long aTimestamp);
 
   nsGeoPosition(nsIDOMGeoPositionCoords *aCoords,
-                nsIDOMGeoPositionAddress *aAddress,
                 DOMTimeStamp aTimestamp);
 
-  void SetAddress(nsIDOMGeoPositionAddress *address) {
-    mAddress = address;
-  }
-
 private:
   ~nsGeoPosition();
   long long mTimestamp;
   nsRefPtr<nsIDOMGeoPositionCoords> mCoords;
-  nsRefPtr<nsIDOMGeoPositionAddress> mAddress;
 };
 
 #endif /* nsGeoPosition_h */
 
--- a/dom/src/geolocation/nsGeoPositionIPCSerialiser.h
+++ b/dom/src/geolocation/nsGeoPositionIPCSerialiser.h
@@ -36,109 +36,22 @@
 
 #ifndef dom_src_geolocation_IPC_serialiser
 #define dom_src_geolocation_IPC_serialiser
 
 #include "IPC/IPCMessageUtils.h"
 #include "nsGeoPosition.h"
 #include "nsIDOMGeoPosition.h"
 
-typedef nsIDOMGeoPositionAddress  *GeoPositionAddress;
 typedef nsGeoPositionCoords       *GeoPositionCoords;
 typedef nsIDOMGeoPosition         *GeoPosition;
 
 namespace IPC {
 
 template <>
-struct ParamTraits<GeoPositionAddress>
-{
-  typedef GeoPositionAddress paramType;
-
-  // Function to serialize a geo position address
-  static void Write(Message *aMsg, const paramType& aParam)
-  {
-    bool isNull = !aParam;
-    WriteParam(aMsg, isNull);
-    // If it is null, then we are done
-    if (isNull) return;
-
-    nsString addressLine;
-
-    aParam->GetStreetNumber(addressLine);
-    WriteParam(aMsg, addressLine);
-
-    aParam->GetStreet(addressLine);
-    WriteParam(aMsg, addressLine);
-
-    aParam->GetPremises(addressLine);
-    WriteParam(aMsg, addressLine);
-
-    aParam->GetCity(addressLine);
-    WriteParam(aMsg, addressLine);
-
-    aParam->GetCounty(addressLine);
-    WriteParam(aMsg, addressLine);
-
-    aParam->GetRegion(addressLine);
-    WriteParam(aMsg, addressLine);
-
-    aParam->GetCountry(addressLine);
-    WriteParam(aMsg, addressLine);
-
-    aParam->GetPostalCode(addressLine);
-    WriteParam(aMsg, addressLine);
-  }
-
-  // Function to de-serialize a geoposition
-  static bool Read(const Message* aMsg, void **aIter, paramType* aResult)
-  {
-    // Check if it is the null pointer we have transfered
-    bool isNull;
-    if (!ReadParam(aMsg, aIter, &isNull)) return false;
-
-    if (isNull) {
-      *aResult = 0;
-      return true;
-    }
-
-    // We need somewhere to store the address before we create the object
-    nsString streetNumber;
-    nsString street;
-    nsString premises;
-    nsString city;
-    nsString county;
-    nsString region;
-    nsString country;
-    nsString postalCode;
-
-    // It's not important to us where it fails, but rather if it fails
-    if (!(ReadParam(aMsg, aIter, &streetNumber) &&
-          ReadParam(aMsg, aIter, &street      ) &&
-          ReadParam(aMsg, aIter, &premises    ) &&
-          ReadParam(aMsg, aIter, &city        ) &&
-          ReadParam(aMsg, aIter, &county      ) &&
-          ReadParam(aMsg, aIter, &region      ) &&
-          ReadParam(aMsg, aIter, &country     ) &&
-          ReadParam(aMsg, aIter, &postalCode  ))) return false;
-
-    // We now have all the data
-    *aResult = new nsGeoPositionAddress(streetNumber, /* aStreetNumber */
-                                        street,       /* aStreet       */
-                                        premises,     /* aPremises     */
-                                        city,         /* aCity         */
-                                        county,       /* aCounty       */
-                                        region,       /* aRegion       */
-                                        country,      /* aCountry      */
-                                        postalCode    /* aPostalCode   */
-                                       );
-    return true;
-  }
-} ;
-
-template <>
 struct ParamTraits<GeoPositionCoords>
 {
   typedef GeoPositionCoords paramType;
 
   // Function to serialize a geoposition
   static void Write(Message *aMsg, const paramType& aParam)
   {
     bool isNull = !aParam;
@@ -230,51 +143,43 @@ struct ParamTraits<GeoPosition>
     DOMTimeStamp timeStamp;
     aParam->GetTimestamp(&timeStamp);
     WriteParam(aMsg, timeStamp);
 
     nsCOMPtr<nsIDOMGeoPositionCoords> coords;
     aParam->GetCoords(getter_AddRefs(coords));
     GeoPositionCoords simpleCoords = static_cast<GeoPositionCoords>(coords.get());
     WriteParam(aMsg, simpleCoords);
-
-    nsCOMPtr<nsIDOMGeoPositionAddress> address;
-    aParam->GetAddress(getter_AddRefs(address));
-    GeoPositionAddress simpleAddress = address.get();
-    WriteParam(aMsg, simpleAddress);
   }
 
   // Function to de-serialize a geoposition
   static bool Read(const Message* aMsg, void **aIter, paramType* aResult)
   {
     // Check if it is the null pointer we have transfered
     bool isNull;
     if (!ReadParam(aMsg, aIter, &isNull)) return false;
 
     if (isNull) {
       *aResult = 0;
       return true;
     }
 
     DOMTimeStamp timeStamp;
     GeoPositionCoords coords = nsnull;
-    GeoPositionAddress address;
 
     // It's not important to us where it fails, but rather if it fails
     if (!(   ReadParam(aMsg, aIter, &timeStamp)
-          && ReadParam(aMsg, aIter, &coords   )
-          && ReadParam(aMsg, aIter, &address  ))) {
+          && ReadParam(aMsg, aIter, &coords   ))) {
           // note it is fine to do "delete nsnull" in case coords hasn't
-          // been allocated and we will never have a case where address
-          // gets allocated and we end here
+          // been allocated
           delete coords;
           return false;
       }
 
-    *aResult = new nsGeoPosition(coords, address, timeStamp);
+    *aResult = new nsGeoPosition(coords, timeStamp);
 
     return true;
   };
 
 };
 
 }
 
--- a/embedding/android/GeckoEvent.java
+++ b/embedding/android/GeckoEvent.java
@@ -247,20 +247,19 @@ public class GeckoEvent {
             mType = PROXIMITY_EVENT;
             mDistance = s.values[0];
             Log.i("GeckoEvent", "SensorEvent type = " + s.sensor.getType() + 
                   " " + s.sensor.getName() + " " + mDistance);
             break;
         }
     }
 
-    public GeckoEvent(Location l, Address a) {
+    public GeckoEvent(Location l) {
         mType = LOCATION_EVENT;
         mLocation = l;
-        mAddress  = a;
     }
 
     public GeckoEvent(int imeAction, int offset, int count) {
         mType = IME_EVENT;
         mAction = imeAction;
         mOffset = offset;
         mCount = count;
     }
--- a/embedding/android/GeckoSurfaceView.java
+++ b/embedding/android/GeckoSurfaceView.java
@@ -575,57 +575,20 @@ class GeckoSurfaceView
     {
     }
 
     public void onSensorChanged(SensorEvent event)
     {
         GeckoAppShell.sendEventToGecko(new GeckoEvent(event));
     }
 
-    private class GeocoderTask extends AsyncTask<Location, Void, Void> {
-        protected Void doInBackground(Location... location) {
-            try {
-                List<Address> addresses = mGeocoder.getFromLocation(location[0].getLatitude(),
-                                                                    location[0].getLongitude(), 1);
-                // grab the first address.  in the future,
-                // may want to expose multiple, or filter
-                // for best.
-                mLastGeoAddress = addresses.get(0);
-                GeckoAppShell.sendEventToGecko(new GeckoEvent(location[0], mLastGeoAddress));
-            } catch (Exception e) {
-                Log.w(LOG_FILE_NAME, "GeocoderTask "+e);
-            }
-            return null;
-        }
-    }
-
     // geolocation
     public void onLocationChanged(Location location)
     {
-        if (mGeocoder == null)
-            mGeocoder = new Geocoder(getContext(), Locale.getDefault());
-
-        if (mLastGeoAddress == null) {
-            new GeocoderTask().execute(location);
-        }
-        else {
-            float[] results = new float[1];
-            Location.distanceBetween(location.getLatitude(),
-                                     location.getLongitude(),
-                                     mLastGeoAddress.getLatitude(),
-                                     mLastGeoAddress.getLongitude(),
-                                     results);
-            // pfm value.  don't want to slam the
-            // geocoder with very similar values, so
-            // only call after about 100m
-            if (results[0] > 100)
-                new GeocoderTask().execute(location);
-        }
-
-        GeckoAppShell.sendEventToGecko(new GeckoEvent(location, mLastGeoAddress));
+        GeckoAppShell.sendEventToGecko(new GeckoEvent(location));
     }
 
     public void onProviderDisabled(String provider)
     {
     }
 
     public void onProviderEnabled(String provider)
     {
@@ -820,14 +783,11 @@ class GeckoSurfaceView
     String mIMEActionHint;
     boolean mIMELandscapeFS;
 
     // Software rendering
     Bitmap mSoftwareBitmap;
     ByteBuffer mSoftwareBuffer;
     Bitmap mSoftwareBufferCopy;
 
-    Geocoder mGeocoder;
-    Address  mLastGeoAddress;
-
     final SynchronousQueue<Object> mSyncDraws = new SynchronousQueue<Object>();
 }
 
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -134,18 +134,16 @@ abstract public class GeckoApp
     private BroadcastReceiver mConnectivityReceiver;
     private BroadcastReceiver mBatteryReceiver;
 
     public static BrowserToolbar mBrowserToolbar;
     public static DoorHangerPopup mDoorHangerPopup;
     public static FormAssistPopup mFormAssistPopup;
     public Favicons mFavicons;
 
-    private Geocoder mGeocoder;
-    private Address  mLastGeoAddress;
     private static LayerController mLayerController;
     private static PlaceholderLayerClient mPlaceholderLayerClient;
     private static GeckoSoftwareLayerClient mSoftwareLayerClient;
     private AboutHomeContent mAboutHomeContent;
     private static AbsoluteLayout mPluginContainer;
 
     public String mLastTitle;
     public String mLastSnapshotUri;
@@ -2613,61 +2611,22 @@ abstract public class GeckoApp
     }
 
     public void onSensorChanged(SensorEvent event)
     {
         Log.w(LOGTAG, "onSensorChanged "+event);
         GeckoAppShell.sendEventToGecko(GeckoEvent.createSensorEvent(event));
     }
 
-    private class GeocoderRunnable implements Runnable {
-        Location mLocation;
-        GeocoderRunnable (Location location) {
-            mLocation = location;
-        }
-        public void run() {
-            try {
-                List<Address> addresses = mGeocoder.getFromLocation(mLocation.getLatitude(),
-                                                                    mLocation.getLongitude(), 1);
-                // grab the first address.  in the future,
-                // may want to expose multiple, or filter
-                // for best.
-                mLastGeoAddress = addresses.get(0);
-                GeckoAppShell.sendEventToGecko(GeckoEvent.createLocationEvent(mLocation, mLastGeoAddress));
-            } catch (Exception e) {
-                Log.w(LOGTAG, "GeocoderTask "+e);
-            }
-        }
-    }
-
     // geolocation
     public void onLocationChanged(Location location)
     {
         Log.w(LOGTAG, "onLocationChanged "+location);
-        if (mGeocoder == null)
-            mGeocoder = new Geocoder(mLayerController.getView().getContext(), Locale.getDefault());
-
-        if (mLastGeoAddress == null) {
-            GeckoAppShell.getHandler().post(new GeocoderRunnable(location));
-        }
-        else {
-            float[] results = new float[1];
-            Location.distanceBetween(location.getLatitude(),
-                                     location.getLongitude(),
-                                     mLastGeoAddress.getLatitude(),
-                                     mLastGeoAddress.getLongitude(),
-                                     results);
-            // pfm value.  don't want to slam the
-            // geocoder with very similar values, so
-            // only call after about 100m
-            if (results[0] > 100)
-                GeckoAppShell.getHandler().post(new GeocoderRunnable(location));
-        }
-
-        GeckoAppShell.sendEventToGecko(GeckoEvent.createLocationEvent(location, mLastGeoAddress));
+
+        GeckoAppShell.sendEventToGecko(GeckoEvent.createLocationEvent(location));
     }
 
     public void onProviderDisabled(String provider)
     {
     }
 
     public void onProviderEnabled(String provider)
     {
--- a/mobile/android/base/GeckoEvent.java
+++ b/mobile/android/base/GeckoEvent.java
@@ -300,20 +300,19 @@ public class GeckoEvent {
         case Sensor.TYPE_PROXIMITY:
             event = new GeckoEvent(PROXIMITY_EVENT);
             event.mDistance = s.values[0];
             break;
         }
         return event;
     }
 
-    public static GeckoEvent createLocationEvent(Location l, Address a) {
+    public static GeckoEvent createLocationEvent(Location l) {
         GeckoEvent event = new GeckoEvent(LOCATION_EVENT);
         event.mLocation = l;
-        event.mAddress  = a;
         return event;
     }
 
     public static GeckoEvent createIMEEvent(int imeAction, int offset, int count) {
         GeckoEvent event = new GeckoEvent(IME_EVENT);
         event.mAction = imeAction;
         event.mOffset = offset;
         event.mCount = count;
--- a/widget/android/AndroidJavaWrappers.cpp
+++ b/widget/android/AndroidJavaWrappers.cpp
@@ -68,17 +68,16 @@ jfieldID AndroidGeckoEvent::jUnicodeChar
 jfieldID AndroidGeckoEvent::jOffsetField = 0;
 jfieldID AndroidGeckoEvent::jCountField = 0;
 jfieldID AndroidGeckoEvent::jPointerIndexField = 0;
 jfieldID AndroidGeckoEvent::jRangeTypeField = 0;
 jfieldID AndroidGeckoEvent::jRangeStylesField = 0;
 jfieldID AndroidGeckoEvent::jRangeForeColorField = 0;
 jfieldID AndroidGeckoEvent::jRangeBackColorField = 0;
 jfieldID AndroidGeckoEvent::jLocationField = 0;
-jfieldID AndroidGeckoEvent::jAddressField = 0;
 jfieldID AndroidGeckoEvent::jBandwidthField = 0;
 jfieldID AndroidGeckoEvent::jCanBeMeteredField = 0;
 
 jclass AndroidPoint::jPointClass = 0;
 jfieldID AndroidPoint::jXField = 0;
 jfieldID AndroidPoint::jYField = 0;
 
 jclass AndroidRect::jRectClass = 0;
@@ -91,29 +90,16 @@ jclass AndroidLocation::jLocationClass =
 jmethodID AndroidLocation::jGetLatitudeMethod = 0;
 jmethodID AndroidLocation::jGetLongitudeMethod = 0;
 jmethodID AndroidLocation::jGetAltitudeMethod = 0;
 jmethodID AndroidLocation::jGetAccuracyMethod = 0;
 jmethodID AndroidLocation::jGetBearingMethod = 0;
 jmethodID AndroidLocation::jGetSpeedMethod = 0;
 jmethodID AndroidLocation::jGetTimeMethod = 0;
 
-jclass AndroidAddress::jAddressClass = 0;
-jmethodID AndroidAddress::jGetAddressLineMethod;
-jmethodID AndroidAddress::jGetAdminAreaMethod;
-jmethodID AndroidAddress::jGetCountryNameMethod;
-jmethodID AndroidAddress::jGetFeatureNameMethod;
-jmethodID AndroidAddress::jGetLocalityMethod;
-jmethodID AndroidAddress::jGetPostalCodeMethod;
-jmethodID AndroidAddress::jGetPremisesMethod;
-jmethodID AndroidAddress::jGetSubAdminAreaMethod;
-jmethodID AndroidAddress::jGetSubLocalityMethod;
-jmethodID AndroidAddress::jGetSubThoroughfareMethod;
-jmethodID AndroidAddress::jGetThoroughfareMethod;
-
 jclass AndroidGeckoSoftwareLayerClient::jGeckoSoftwareLayerClientClass = 0;
 jmethodID AndroidGeckoSoftwareLayerClient::jLockBufferMethod = 0;
 jmethodID AndroidGeckoSoftwareLayerClient::jUnlockBufferMethod = 0;
 jmethodID AndroidGeckoSoftwareLayerClient::jBeginDrawingMethod = 0;
 jmethodID AndroidGeckoSoftwareLayerClient::jEndDrawingMethod = 0;
 jclass AndroidGeckoSurfaceView::jGeckoSurfaceViewClass = 0;
 jmethodID AndroidGeckoSurfaceView::jBeginDrawingMethod = 0;
 jmethodID AndroidGeckoSurfaceView::jEndDrawingMethod = 0;
@@ -137,17 +123,16 @@ jmethodID AndroidGeckoSurfaceView::jGetH
     ((jmethodID) jEnv->GetMethodID(jClass, fname, ftype))
 
 void
 mozilla::InitAndroidJavaWrappers(JNIEnv *jEnv)
 {
     AndroidGeckoEvent::InitGeckoEventClass(jEnv);
     AndroidPoint::InitPointClass(jEnv);
     AndroidLocation::InitLocationClass(jEnv);
-    AndroidAddress::InitAddressClass(jEnv);
     AndroidRect::InitRectClass(jEnv);
     AndroidGeckoSoftwareLayerClient::InitGeckoSoftwareLayerClientClass(jEnv);
     AndroidGeckoSurfaceView::InitGeckoSurfaceViewClass(jEnv);
 }
 
 void
 AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv)
 {
@@ -181,17 +166,16 @@ AndroidGeckoEvent::InitGeckoEventClass(J
     jOffsetField = getField("mOffset", "I");
     jCountField = getField("mCount", "I");
     jPointerIndexField = getField("mPointerIndex", "I");
     jRangeTypeField = getField("mRangeType", "I");
     jRangeStylesField = getField("mRangeStyles", "I");
     jRangeForeColorField = getField("mRangeForeColor", "I");
     jRangeBackColorField = getField("mRangeBackColor", "I");
     jLocationField = getField("mLocation", "Landroid/location/Location;");
-    jAddressField = getField("mAddress", "Landroid/location/Address;");
     jBandwidthField = getField("mBandwidth", "D");
     jCanBeMeteredField = getField("mCanBeMetered", "Z");
 }
 
 void
 AndroidGeckoSurfaceView::InitGeckoSurfaceViewClass(JNIEnv *jEnv)
 {
 #ifndef MOZ_JAVA_COMPOSITOR
@@ -220,70 +204,16 @@ AndroidLocation::InitLocationClass(JNIEn
     jGetLongitudeMethod = getMethod("getLongitude", "()D");
     jGetAltitudeMethod = getMethod("getAltitude", "()D");
     jGetAccuracyMethod = getMethod("getAccuracy", "()F");
     jGetBearingMethod = getMethod("getBearing", "()F");
     jGetSpeedMethod = getMethod("getSpeed", "()F");
     jGetTimeMethod = getMethod("getTime", "()J");
 }
 
-void
-AndroidAddress::InitAddressClass(JNIEnv *jEnv)
-{
-    initInit();
-
-    jAddressClass = getClassGlobalRef("android/location/Address");
-
-    jGetAddressLineMethod = getMethod("getAddressLine", "(I)Ljava/lang/String;");
-    jGetAdminAreaMethod = getMethod("getAdminArea", "()Ljava/lang/String;");
-    jGetCountryNameMethod = getMethod("getCountryName", "()Ljava/lang/String;");
-    jGetFeatureNameMethod = getMethod("getFeatureName", "()Ljava/lang/String;");
-    jGetLocalityMethod  = getMethod("getLocality", "()Ljava/lang/String;");
-    jGetPostalCodeMethod = getMethod("getPostalCode", "()Ljava/lang/String;");
-    jGetPremisesMethod = getMethod("getPremises", "()Ljava/lang/String;");
-    jGetSubAdminAreaMethod = getMethod("getSubAdminArea", "()Ljava/lang/String;");
-    jGetSubLocalityMethod = getMethod("getSubLocality", "()Ljava/lang/String;");
-    jGetSubThoroughfareMethod = getMethod("getSubThoroughfare", "()Ljava/lang/String;");
-    jGetThoroughfareMethod = getMethod("getThoroughfare", "()Ljava/lang/String;");
-}
-
-nsGeoPositionAddress*
-AndroidAddress::CreateGeoPositionAddress(JNIEnv *jenv, jobject jobj)
-{
-    nsJNIString streetNumber(static_cast<jstring>(jenv->CallObjectMethod(jobj, jGetSubThoroughfareMethod)), jenv);
-    nsJNIString street(static_cast<jstring>(jenv->CallObjectMethod(jobj, jGetThoroughfareMethod)), jenv);
-    nsJNIString city(static_cast<jstring>(jenv->CallObjectMethod(jobj, jGetLocalityMethod)), jenv);
-    nsJNIString county(static_cast<jstring>(jenv->CallObjectMethod(jobj, jGetSubAdminAreaMethod)), jenv);
-    nsJNIString country(static_cast<jstring>(jenv->CallObjectMethod(jobj, jGetCountryNameMethod)), jenv);
-    nsJNIString premises(static_cast<jstring>(jenv->CallObjectMethod(jobj, jGetPremisesMethod)), jenv);
-    nsJNIString postalCode(static_cast<jstring>(jenv->CallObjectMethod(jobj, jGetPostalCodeMethod)), jenv);
-    nsJNIString region(static_cast<jstring>(jenv->CallObjectMethod(jobj, jGetAdminAreaMethod, 0)), jenv);
-
-#ifdef DEBUG
-    printf_stderr("!!!!!!!!!!!!!! AndroidAddress::CreateGeoPositionAddress:\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
-                  NS_LossyConvertUTF16toASCII(streetNumber).get(),
-                  NS_LossyConvertUTF16toASCII(street).get(),
-                  NS_LossyConvertUTF16toASCII(premises).get(),
-                  NS_LossyConvertUTF16toASCII(city).get(),
-                  NS_LossyConvertUTF16toASCII(county).get(),
-                  NS_LossyConvertUTF16toASCII(region).get(),
-                  NS_LossyConvertUTF16toASCII(country).get(),
-                  NS_LossyConvertUTF16toASCII(postalCode).get());
-#endif
-
-    return new nsGeoPositionAddress(streetNumber,
-                                    street,
-                                    premises,
-                                    city,
-                                    county,
-                                    region,
-                                    country,
-                                    postalCode);
-}
-
 nsGeoPosition*
 AndroidLocation::CreateGeoPosition(JNIEnv *jenv, jobject jobj)
 {
     double latitude  = jenv->CallDoubleMethod(jobj, jGetLatitudeMethod);
     double longitude = jenv->CallDoubleMethod(jobj, jGetLongitudeMethod);
     double altitude  = jenv->CallDoubleMethod(jobj, jGetAltitudeMethod);
     float  accuracy  = jenv->CallFloatMethod (jobj, jGetAccuracyMethod);
     float  bearing   = jenv->CallFloatMethod (jobj, jGetBearingMethod);
@@ -506,21 +436,17 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jo
        case ACCELERATION_EVENT:
             mX = jenv->GetDoubleField(jobj, jXField);
             mY = jenv->GetDoubleField(jobj, jYField);
             mZ = jenv->GetDoubleField(jobj, jZField);
             break;
 
         case LOCATION_EVENT: {
             jobject location = jenv->GetObjectField(jobj, jLocationField);
-            jobject address  = jenv->GetObjectField(jobj, jAddressField);
-
             mGeoPosition = AndroidLocation::CreateGeoPosition(jenv, location);
-            if (address)
-                mGeoAddress = AndroidAddress::CreateGeoPositionAddress(jenv, address);
             break;
         }
 
         case LOAD_URI: {
             ReadCharactersField(jenv);
             break;
         }
 
--- a/widget/android/AndroidJavaWrappers.h
+++ b/widget/android/AndroidJavaWrappers.h
@@ -379,35 +379,16 @@ public:
     static jmethodID jGetLongitudeMethod;
     static jmethodID jGetAltitudeMethod;
     static jmethodID jGetAccuracyMethod;
     static jmethodID jGetBearingMethod;
     static jmethodID jGetSpeedMethod;
     static jmethodID jGetTimeMethod;
 };
 
-class AndroidAddress : public WrappedJavaObject
-{
-public:
-    static void InitAddressClass(JNIEnv *jEnv);
-    static nsGeoPositionAddress* CreateGeoPositionAddress(JNIEnv *jenv, jobject jobj);
-    static jclass jAddressClass;
-    static jmethodID jGetAddressLineMethod;
-    static jmethodID jGetAdminAreaMethod;
-    static jmethodID jGetCountryNameMethod;
-    static jmethodID jGetFeatureNameMethod;
-    static jmethodID jGetLocalityMethod;
-    static jmethodID jGetPostalCodeMethod;
-    static jmethodID jGetPremisesMethod;
-    static jmethodID jGetSubAdminAreaMethod;
-    static jmethodID jGetSubLocalityMethod;
-    static jmethodID jGetSubThoroughfareMethod;
-    static jmethodID jGetThoroughfareMethod;
-};
-
 class AndroidGeckoEvent : public WrappedJavaObject
 {
 public:
     static void InitGeckoEventClass(JNIEnv *jEnv);
 
     AndroidGeckoEvent() { }
     AndroidGeckoEvent(int aType) {
         Init(aType);
@@ -456,17 +437,16 @@ public:
     int Offset() { return mOffset; }
     int Count() { return mCount; }
     int PointerIndex() { return mPointerIndex; }
     int RangeType() { return mRangeType; }
     int RangeStyles() { return mRangeStyles; }
     int RangeForeColor() { return mRangeForeColor; }
     int RangeBackColor() { return mRangeBackColor; }
     nsGeoPosition* GeoPosition() { return mGeoPosition; }
-    nsGeoPositionAddress* GeoAddress() { return mGeoAddress; }
     double Bandwidth() { return mBandwidth; }
     bool CanBeMetered() { return mCanBeMetered; }
 
 protected:
     int mAction;
     int mType;
     int64_t mTime;
     nsTArray<nsIntPoint> mPoints;
@@ -481,17 +461,16 @@ protected:
     int mRangeType, mRangeStyles;
     int mRangeForeColor, mRangeBackColor;
     double mAlpha, mBeta, mGamma;
     double mX, mY, mZ;
     double mDistance;
     int mPointerIndex;
     nsString mCharacters, mCharactersExtra;
     nsRefPtr<nsGeoPosition> mGeoPosition;
-    nsRefPtr<nsGeoPositionAddress> mGeoAddress;
     double mBandwidth;
     bool mCanBeMetered;
 
     void ReadIntArray(nsTArray<int> &aVals,
                       JNIEnv *jenv,
                       jfieldID field,
                       PRUint32 count);
     void ReadFloatArray(nsTArray<float> &aVals,
@@ -534,17 +513,16 @@ protected:
     static jfieldID jCountField;
     static jfieldID jPointerIndexField;
     static jfieldID jUnicodeCharField;
     static jfieldID jRangeTypeField;
     static jfieldID jRangeStylesField;
     static jfieldID jRangeForeColorField;
     static jfieldID jRangeBackColorField;
     static jfieldID jLocationField;
-    static jfieldID jAddressField;
 
     static jfieldID jBandwidthField;
     static jfieldID jCanBeMeteredField;
 
 public:
     enum {
         NATIVE_POKE = 0,
         KEY_EVENT = 1,
--- a/widget/android/nsAppShell.cpp
+++ b/widget/android/nsAppShell.cpp
@@ -346,22 +346,18 @@ nsAppShell::ProcessNextNativeEvent(bool 
         mPendingOrientationEvents = false;
         break;
 
     case AndroidGeckoEvent::LOCATION_EVENT: {
         if (!gLocationCallback)
             break;
 
         nsGeoPosition* p = curEvent->GeoPosition();
-        nsGeoPositionAddress* a = curEvent->GeoAddress();
-
-        if (p) {
-            p->SetAddress(a);
+        if (p)
             gLocationCallback->Update(curEvent->GeoPosition());
-        }
         else
             NS_WARNING("Received location event without geoposition!");
         break;
     }
 
     case AndroidGeckoEvent::PROXIMITY_EVENT: {
         InfallibleTArray<float> values;
         values.AppendElement(curEvent->Distance());