|
Lines 80-86
static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu
a/Source/WebCore/bindings/js/JSGeolocationCustom.cpp_sec1
|
| 80 |
if (exec->hadException()) |
80 |
if (exec->hadException()) |
| 81 |
return 0; |
81 |
return 0; |
| 82 |
// If the value is positive infinity, there's nothing to do. |
82 |
// If the value is positive infinity, there's nothing to do. |
| 83 |
if (!(isinf(timeoutNumber) && (timeoutNumber > 0))) { |
83 |
if (!(std::isinf(timeoutNumber) && (timeoutNumber > 0))) { |
| 84 |
// Wrap to int32 and force non-negative to match behavior of window.setTimeout. |
84 |
// Wrap to int32 and force non-negative to match behavior of window.setTimeout. |
| 85 |
options->setTimeout(max(0, timeoutValue.toInt32(exec))); |
85 |
options->setTimeout(max(0, timeoutValue.toInt32(exec))); |
| 86 |
if (exec->hadException()) |
86 |
if (exec->hadException()) |
|
Lines 95-101
static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu
a/Source/WebCore/bindings/js/JSGeolocationCustom.cpp_sec2
|
| 95 |
double maximumAgeNumber = maximumAgeValue.toNumber(exec); |
95 |
double maximumAgeNumber = maximumAgeValue.toNumber(exec); |
| 96 |
if (exec->hadException()) |
96 |
if (exec->hadException()) |
| 97 |
return 0; |
97 |
return 0; |
| 98 |
if (isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) { |
98 |
if (std::isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) { |
| 99 |
// If the value is positive infinity, clear maximumAge. |
99 |
// If the value is positive infinity, clear maximumAge. |
| 100 |
options->clearMaximumAge(); |
100 |
options->clearMaximumAge(); |
| 101 |
} else { |
101 |
} else { |