Bug 463295 - crash if geolocation timeout < 300ms. r/sr=jst

This commit is contained in:
Doug Turner 2008-11-12 08:05:32 -08:00
Родитель bb3443708e
Коммит 72472317ab
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -268,6 +268,12 @@ nsGeolocationRequest::SendLocation(nsIDOMGeoPosition* aPosition)
if (mCleared || !mAllowed)
return;
// we should not pass null back to the DOM.
if (!aPosition) {
NotifyError(nsIDOMGeoPositionError::POSITION_UNAVAILABLE);
return;
}
// Ensure that the proper context is on the stack (bug 452762)
nsCOMPtr<nsIJSContextStack> stack(do_GetService("@mozilla.org/js/xpc/ContextStack;1"));
if (!stack || NS_FAILED(stack->Push(nsnull)))