Bug 727233 - don't delete an interface. r=doug.turner.
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Mon, 27 Feb 2012 08:28:25 -0500
changeset 87842 f91b74bfcb1fb8ef99bba7f11535c23364896b01
parent 87841 c6fe976aac16f404887a5fc725f10e355328cc43
child 87843 d9640938c8263eaa2cb42e21cf902ca34b4e3af4
push id22160
push usermbrubeck@mozilla.com
push dateTue, 28 Feb 2012 17:21:33 +0000
treeherdermozilla-central@dde4e0089a18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdoug.turner
bugs727233
milestone13.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 727233 - don't delete an interface. r=doug.turner.
dom/src/geolocation/nsGeoPosition.h
dom/src/geolocation/nsGeoPositionIPCSerialiser.h
--- a/dom/src/geolocation/nsGeoPosition.h
+++ b/dom/src/geolocation/nsGeoPosition.h
@@ -81,28 +81,28 @@ public:
 
 ////////////////////////////////////////////////////
 // nsGeoPositionCoords
 ////////////////////////////////////////////////////
 
 /**
  * Simple object that holds a single point in space.
  */
-class nsGeoPositionCoords : public nsIDOMGeoPositionCoords
+class nsGeoPositionCoords MOZ_FINAL : public nsIDOMGeoPositionCoords
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMGEOPOSITIONCOORDS
   
   nsGeoPositionCoords(double aLat, double aLong,
                       double aAlt, double aHError,
                       double aVError, double aHeading,
                       double aSpeed);
+  ~nsGeoPositionCoords();
 private:
-  ~nsGeoPositionCoords();
   const double mLat, mLong, mAlt, mHError, mVError, mHeading, mSpeed;
 };
 
 
 ////////////////////////////////////////////////////
 // nsGeoPosition
 ////////////////////////////////////////////////////
 
--- a/dom/src/geolocation/nsGeoPositionIPCSerialiser.h
+++ b/dom/src/geolocation/nsGeoPositionIPCSerialiser.h
@@ -37,17 +37,17 @@
 #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 nsIDOMGeoPositionCoords   *GeoPositionCoords;
+typedef nsGeoPositionCoords       *GeoPositionCoords;
 typedef nsIDOMGeoPosition         *GeoPosition;
 
 namespace IPC {
 
 template <>
 struct ParamTraits<GeoPositionAddress>
 {
   typedef GeoPositionAddress paramType;
@@ -228,17 +228,17 @@ struct ParamTraits<GeoPosition>
     if (isNull) return;
 
     DOMTimeStamp timeStamp;
     aParam->GetTimestamp(&timeStamp);
     WriteParam(aMsg, timeStamp);
 
     nsCOMPtr<nsIDOMGeoPositionCoords> coords;
     aParam->GetCoords(getter_AddRefs(coords));
-    GeoPositionCoords simpleCoords = coords.get();
+    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);
   }