summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/bindings/v8/custom/V8GeolocationCustom.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp b/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
index 7bc687c..b4fd9f5 100644
--- a/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
@@ -130,13 +130,7 @@ static PassRefPtr<PositionOptions> createPositionOptions(v8::Local<v8::Value> va
return 0;
}
double timeoutDouble = timeoutNumber->Value();
- // V8 does not export a public symbol for infinity, so we must use a
- // platform type. On Android, it seems that V8 uses 0xf70f000000000000,
- // which is the standard way to represent infinity in a double. However,
- // numeric_limits<double>::infinity uses the system HUGE_VAL, which is
- // different. Therefore we test using isinf() and check that the value
- // is positive, which seems to handle things correctly.
- // If the value is infinity, there's nothing to do.
+ // If the value is positive infinity, there's nothing to do.
if (!(isinf(timeoutDouble) && timeoutDouble > 0)) {
v8::Local<v8::Int32> timeoutInt32 = timeoutValue->ToInt32();
if (timeoutInt32.IsEmpty()) {
@@ -161,7 +155,7 @@ static PassRefPtr<PositionOptions> createPositionOptions(v8::Local<v8::Value> va
}
double maximumAgeDouble = maximumAgeNumber->Value();
if (isinf(maximumAgeDouble) && maximumAgeDouble > 0) {
- // If the value is infinity, clear maximumAge.
+ // If the value is positive infinity, clear maximumAge.
options->clearMaximumAge();
} else {
v8::Local<v8::Int32> maximumAgeInt32 = maximumAgeValue->ToInt32();