зеркало из https://github.com/mozilla/gecko-dev.git
Bug 898240 - Properly shutdown the pending geolocation requests. r=kanru
This commit is contained in:
Родитель
ec160deea3
Коммит
cadda1c60a
|
@ -1346,6 +1346,17 @@ Geolocation::ClearWatch(int32_t aWatchId)
|
|||
}
|
||||
}
|
||||
|
||||
// make sure we also search through the pending requests lists for
|
||||
// watches to clear...
|
||||
for (uint32_t i = 0, length = mPendingRequests.Length(); i < length; ++i) {
|
||||
if ((mPendingRequests[i].type == PendingRequest::WatchPosition) &&
|
||||
(mPendingRequests[i].request->WatchId() == aWatchId)) {
|
||||
mPendingRequests[i].request->Shutdown();
|
||||
mPendingRequests.RemoveElementAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче