Bug 1263001 - Don't Notify() an unlinked nsGeolocationRequest. r=jdm

If an unlinked nsGeolocationRequest somehow stays alive, then calling
Notify() on it will likely cause a null-deref crash.
This commit is contained in:
Andrew McCreight 2016-04-22 14:15:36 -07:00
parent c40c75a905
commit f417b18c2b

View File

@ -791,7 +791,7 @@ NS_IMPL_ISUPPORTS(nsGeolocationRequest::TimerCallbackHolder, nsISupports, nsITim
NS_IMETHODIMP
nsGeolocationRequest::TimerCallbackHolder::Notify(nsITimer*)
{
if (mRequest) {
if (mRequest && mRequest->mLocator) {
RefPtr<nsGeolocationRequest> request(mRequest);
request->Notify();
}