Bug 645325 - Part 3: Remove nsGeoPosition's unused `long long aTimestamp` constructor. r=garvank r=jdm
authorChris Peterson <cpeterson@mozilla.com>
Sun, 25 Feb 2018 16:32:16 -0800
changeset 478786 14e4da56b11b208bf49521f3490ca51143d562f4
parent 478785 814c7e1c16e505a87ee1c27b814a00839dba08c8
child 478787 7482eb372d941c9e171fade2c32eb5bc44ef97e1
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgarvank, jdm
bugs645325
milestone62.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 645325 - Part 3: Remove nsGeoPosition's unused `long long aTimestamp` constructor. r=garvank r=jdm And change nsGeoPosition to store DOMTimeStamp instead of long long because it is a more descriptive type. DOMTimeStamp is a typedef for uint64_t, so we're not losing any precision using DOMTimeStamp instead of long long. MozReview-Commit-ID: hjXnw959yC
dom/geolocation/nsGeoPosition.cpp
dom/geolocation/nsGeoPosition.h
--- a/dom/geolocation/nsGeoPosition.cpp
+++ b/dom/geolocation/nsGeoPosition.cpp
@@ -124,33 +124,26 @@ nsGeoPositionCoords::GetSpeed(double *aS
 
 ////////////////////////////////////////////////////
 // nsGeoPosition
 ////////////////////////////////////////////////////
 
 nsGeoPosition::nsGeoPosition(double aLat, double aLong,
                              double aAlt, double aHError,
                              double aVError, double aHeading,
-                             double aSpeed, long long aTimestamp) :
+                             double aSpeed, DOMTimeStamp aTimestamp) :
     mTimestamp(aTimestamp)
 {
     mCoords = new nsGeoPositionCoords(aLat, aLong,
                                       aAlt, aHError,
                                       aVError, aHeading,
                                       aSpeed);
 }
 
 nsGeoPosition::nsGeoPosition(nsIDOMGeoPositionCoords *aCoords,
-                             long long aTimestamp) :
-    mTimestamp(aTimestamp),
-    mCoords(aCoords)
-{
-}
-
-nsGeoPosition::nsGeoPosition(nsIDOMGeoPositionCoords *aCoords,
                              DOMTimeStamp aTimestamp) :
   mTimestamp(aTimestamp),
   mCoords(aCoords)
 {
 }
 
 nsGeoPosition::~nsGeoPosition()
 {
--- a/dom/geolocation/nsGeoPosition.h
+++ b/dom/geolocation/nsGeoPosition.h
@@ -47,28 +47,24 @@ class nsGeoPosition final : public nsIDO
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIDOMGEOPOSITION
 
   nsGeoPosition(double aLat, double aLong,
                 double aAlt, double aHError,
                 double aVError, double aHeading,
-                double aSpeed, long long aTimestamp);
-
-
-  nsGeoPosition(nsIDOMGeoPositionCoords *aCoords,
-                long long aTimestamp);
+                double aSpeed, DOMTimeStamp aTimestamp);
 
   nsGeoPosition(nsIDOMGeoPositionCoords *aCoords,
                 DOMTimeStamp aTimestamp);
 
 private:
   ~nsGeoPosition();
-  long long mTimestamp;
+  DOMTimeStamp mTimestamp;
   RefPtr<nsIDOMGeoPositionCoords> mCoords;
 };
 
 ////////////////////////////////////////////////////
 // WebIDL wrappers for the classes above
 ////////////////////////////////////////////////////
 
 namespace mozilla {