Bug 676316 - Reverse the device motion listener removal early return logic. r=dougt

--HG--
extra : rebase_source : 026f0fe58b06fb3839826ba07ef4f9a2d89d1ef4
This commit is contained in:
Josh Matthews 2011-08-04 18:22:45 -04:00
parent 382a5d28c4
commit 8402ee5ab4

View File

@ -209,7 +209,7 @@ NS_IMETHODIMP nsDeviceMotion::AddWindowListener(nsIDOMWindow *aWindow)
NS_IMETHODIMP nsDeviceMotion::RemoveWindowListener(nsIDOMWindow *aWindow)
{
if (mWindowListeners.IndexOf(aWindow) != NoIndex)
if (mWindowListeners.IndexOf(aWindow) == NoIndex)
return NS_OK;
mWindowListeners.RemoveElement(aWindow);