зеркало из https://github.com/mozilla/pjs.git
Bug 468462 - Geolocation timeouts values are signed. r/sr=jst
This commit is contained in:
Родитель
dc821b6f4f
Коммит
58c82b4a73
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче