diff --git a/dom/public/idl/geolocation/nsIDOMGeoPositionOptions.idl b/dom/public/idl/geolocation/nsIDOMGeoPositionOptions.idl index 4ca695ab283..2764d6960e6 100644 --- a/dom/public/idl/geolocation/nsIDOMGeoPositionOptions.idl +++ b/dom/public/idl/geolocation/nsIDOMGeoPositionOptions.idl @@ -37,10 +37,10 @@ #include "domstubs.idl" -[scriptable, uuid(19C44AAA-64E4-4D25-8C59-EEE7ADCEB709)] +[scriptable, uuid(453B72DE-EA90-4F09-AE16-C2E7EE0DDDC4)] interface nsIDOMGeoPositionOptions : nsISupports { attribute boolean enableHighAccuracy; - attribute unsigned long timeout; - attribute unsigned long maximumAge; + attribute long timeout; + attribute long maximumAge; }; diff --git a/dom/src/geolocation/nsGeolocation.cpp b/dom/src/geolocation/nsGeolocation.cpp index eebae0e3acd..a353bbea645 100644 --- a/dom/src/geolocation/nsGeolocation.cpp +++ b/dom/src/geolocation/nsGeolocation.cpp @@ -261,10 +261,12 @@ nsGeolocationRequest::Allow() PRUint32 maximumAge = 30 * PR_MSEC_PER_SEC; if (mOptions) { - PRUint32 tempAge; + PRInt32 tempAge; nsresult rv = mOptions->GetMaximumAge(&tempAge); - if (NS_SUCCEEDED(rv)) - maximumAge = tempAge; + if (NS_SUCCEEDED(rv)) { + if (tempAge > 0) + maximumAge = tempAge; + } } if (lastPosition && maximumAge > 0 && ( (PR_Now() / PR_USEC_PER_MSEC ) - maximumAge <= cachedPositionTime) ) { @@ -278,7 +280,7 @@ nsGeolocationRequest::Allow() mLocator->RemoveRequest(this); } - PRUint32 timeout; + PRInt32 timeout; if (mOptions && NS_SUCCEEDED(mOptions->GetTimeout(&timeout)) && timeout > 0) { if (timeout < 10)