зеркало из https://github.com/mozilla/gecko-dev.git
Bug 640201 - If nsGeolocation::Init fails, mGeolocation is not clear and will be returned on subsequent calls. r=jst
This commit is contained in:
Родитель
ca113799ab
Коммит
61b7469f45
|
@ -10990,9 +10990,11 @@ NS_IMETHODIMP nsNavigator::GetGeolocation(nsIDOMGeoGeolocation **_retval)
|
|||
if (!mGeolocation)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (NS_FAILED(mGeolocation->Init(contentDOMWindow)))
|
||||
if (NS_FAILED(mGeolocation->Init(contentDOMWindow))) {
|
||||
mGeolocation = nsnull;
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
}
|
||||
|
||||
NS_ADDREF(*_retval = mGeolocation);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче