mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
[Bug 503750] Crash when parameters of navigator.geolocation.getCurrentPosition are null. r/sr=jst
This commit is contained in:
parent
0f02b17cc3
commit
a4523b236a
@ -806,6 +806,8 @@ nsGeolocation::GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
|
||||
nsIDOMGeoPositionErrorCallback *errorCallback,
|
||||
nsIDOMGeoPositionOptions *options)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(callback);
|
||||
|
||||
if (sGeoEnabled == PR_FALSE)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
@ -836,6 +838,8 @@ nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *aCallback,
|
||||
nsIDOMGeoPositionOptions *aOptions,
|
||||
PRInt32 *_retval NS_OUTPARAM)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCallback);
|
||||
|
||||
if (sGeoEnabled == PR_FALSE)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user