summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-10-08 15:29:34 +0100
committerSteve Block <steveblock@google.com>2009-10-14 19:39:24 +0100
commit734b5134dfb8de1717b5772d41dd8fdcc093980e (patch)
treebe5c39697e70b1a5727081b3f216428a4c3ee546 /WebCore/bindings
parent6c2d6953902b07e2368913f8314bf2ba9062210c (diff)
downloadexternal_webkit-734b5134dfb8de1717b5772d41dd8fdcc093980e.zip
external_webkit-734b5134dfb8de1717b5772d41dd8fdcc093980e.tar.gz
external_webkit-734b5134dfb8de1717b5772d41dd8fdcc093980e.tar.bz2
Bring Geolocation V8 bindings in line with those for JSC. Do not merge.
This has already been submitted to master branch.
Diffstat (limited to 'WebCore/bindings')
-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();