mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 03:24:26 +00:00
Bug 681941 - Ensure that we always clear geolocation requests that are not long-lived, and never clear ones that are. r=dougt
This commit is contained in:
parent
1fa104a507
commit
134e9f8707
@ -149,7 +149,7 @@ public:
|
||||
// have to do more, then we can change this around.
|
||||
RequestSendLocationEvent(nsIDOMGeoPosition* aPosition,
|
||||
nsGeolocationRequest* aRequest,
|
||||
nsGeolocation* aLocator = nsnull)
|
||||
nsGeolocation* aLocator)
|
||||
: mPosition(aPosition),
|
||||
mRequest(aRequest),
|
||||
mLocator(aLocator)
|
||||
@ -389,7 +389,9 @@ nsGeolocationRequest::Allow()
|
||||
// okay, we can return a cached position
|
||||
mAllowed = PR_TRUE;
|
||||
|
||||
nsCOMPtr<nsIRunnable> ev = new RequestSendLocationEvent(lastPosition, this, mLocator);
|
||||
nsCOMPtr<nsIRunnable> ev =
|
||||
new RequestSendLocationEvent(lastPosition, this,
|
||||
mIsWatchPositionRequest ? nsnull : mLocator);
|
||||
NS_DispatchToMainThread(ev);
|
||||
}
|
||||
|
||||
@ -462,7 +464,9 @@ nsGeolocationRequest::SendLocation(nsIDOMGeoPosition* aPosition)
|
||||
void
|
||||
nsGeolocationRequest::Update(nsIDOMGeoPosition* aPosition)
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> ev = new RequestSendLocationEvent(aPosition, this);
|
||||
nsCOMPtr<nsIRunnable> ev =
|
||||
new RequestSendLocationEvent(aPosition, this,
|
||||
mIsWatchPositionRequest ? nsnull : mLocator);
|
||||
NS_DispatchToMainThread(ev);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user