Back out 0501a5506c87 (bug 741131) because of test failures

This commit is contained in:
Matt Brubeck 2012-04-02 10:33:01 -07:00
parent ced4ea20e1
commit 16def08c7b

View File

@ -419,13 +419,11 @@ nsGeolocationRequest::SetTimeoutTimer()
mTimeoutTimer = nsnull;
}
PRInt32 timeout;
if (mOptions && NS_SUCCEEDED(mOptions->GetTimeout(&timeout))) {
if (mOptions && NS_SUCCEEDED(mOptions->GetTimeout(&timeout)) && timeout > 0) {
if (timeout < 0)
timeout = 0;
else if (timeout < 10)
if (timeout < 10)
timeout = 10;
mTimeoutTimer = do_CreateInstance("@mozilla.org/timer;1");
mTimeoutTimer->InitWithCallback(this, timeout, nsITimer::TYPE_ONE_SHOT);
}