Bug 526316 - ClearWatch should not throw when given bad input. r=olli

--HG--
extra : rebase_source : a8829e12d26ad0793017a70b96f77c647afb2771
This commit is contained in:
Doug Turner 2009-11-13 09:19:45 -08:00
parent db59e0fe7f
commit f2594937d2

View File

@ -925,7 +925,7 @@ nsGeolocation::ClearWatch(PRInt32 aWatchId)
{
PRUint32 count = mWatchingCallbacks.Length();
if (aWatchId < 0 || count == 0 || aWatchId > count)
return NS_ERROR_FAILURE;
return NS_OK;
mWatchingCallbacks[aWatchId]->MarkCleared();
return NS_OK;