summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSGeolocationCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSGeolocationCustom.cpp')
-rw-r--r--WebCore/bindings/js/JSGeolocationCustom.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/WebCore/bindings/js/JSGeolocationCustom.cpp b/WebCore/bindings/js/JSGeolocationCustom.cpp
index 1b9bce8..c818dd9 100644
--- a/WebCore/bindings/js/JSGeolocationCustom.cpp
+++ b/WebCore/bindings/js/JSGeolocationCustom.cpp
@@ -60,7 +60,14 @@ static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu
if (exec->hadException())
return 0;
- return PositionOptions::create(enableHighAccuracy, timeout);
+ JSValuePtr maximumAgeValue = object->get(exec, Identifier(exec, "maximumAge"));
+ if (exec->hadException())
+ return 0;
+ unsigned maximumAge = maximumAgeValue.toUInt32(exec);
+ if (exec->hadException())
+ return 0;
+
+ return PositionOptions::create(enableHighAccuracy, timeout, maximumAge);
}
JSValuePtr JSGeolocation::getCurrentPosition(ExecState* exec, const ArgList& args)