Chromium Code Reviews| Index: Source/bindings/v8/custom/V8GeolocationCustom.cpp |
| diff --git a/Source/bindings/v8/custom/V8GeolocationCustom.cpp b/Source/bindings/v8/custom/V8GeolocationCustom.cpp |
| index 213fab7ee502c910f022a8721af11e1af59734f1..b4f5c596cd8a80df55c3a8c5422a7a73073c2872 100644 |
| --- a/Source/bindings/v8/custom/V8GeolocationCustom.cpp |
| +++ b/Source/bindings/v8/custom/V8GeolocationCustom.cpp |
| @@ -105,15 +105,11 @@ static PassRefPtrWillBeRawPtr<PositionOptions> createPositionOptions(v8::Local<v |
| return nullptr; |
| } |
| double maximumAgeDouble = maximumAgeNumber->Value(); |
| - if (std::isinf(maximumAgeDouble) && maximumAgeDouble > 0) { |
| - // If the value is positive infinity, clear maximumAge. |
| - options->clearMaximumAge(); |
| + if ((std::isinf(maximumAgeDouble) && maximumAgeDouble > 0) || maximumAgeDouble <= 0) { |
| + // If the value is positive infinity or negative |
|
Nils Barth (inactive)
2014/05/26 01:20:43
???
If the value of maximumAge is set to positive
kihong
2014/05/26 04:23:43
You are right.
I will change this with next patch.
|
| + options->setMaximumAge(0); |
| } else { |
| - if (maximumAgeDouble <= 0) { |
| - options->setMaximumAge(0); |
| - } else { |
| - options->setMaximumAge(toUInt32(maximumAgeValue, Clamp, exceptionState)); |
| - } |
| + options->setMaximumAge(toUInt32(maximumAgeValue, Clamp, exceptionState)); |
| } |
| } |