Chromium Code Reviews| Index: Source/bindings/core/v8/V8Binding.h |
| diff --git a/Source/bindings/core/v8/V8Binding.h b/Source/bindings/core/v8/V8Binding.h |
| index 780e11025789cc823e047b40604caa849341c039..918c673492d611409137a58ea99d1cde98fe21d3 100644 |
| --- a/Source/bindings/core/v8/V8Binding.h |
| +++ b/Source/bindings/core/v8/V8Binding.h |
| @@ -478,18 +478,6 @@ inline uint64_t toUInt64(v8::Handle<v8::Value> value, ExceptionState& exceptionS |
| // Convert a value to a 64-bit unsigned integer assuming the conversion cannot fail. |
| uint64_t toUInt64(v8::Handle<v8::Value>); |
| -// Convert a value to a single precision float, which might fail. |
| -float toFloat(v8::Handle<v8::Value>, ExceptionState&); |
| - |
| -// Convert a value to a single precision float, throwing on non-finite values. |
| -float toRestrictedFloat(v8::Handle<v8::Value>, ExceptionState&); |
| - |
| -// Convert a value to a single precision float assuming the conversion cannot fail. |
| -inline float toFloat(v8::Local<v8::Value> value) |
| -{ |
| - return static_cast<float>(value->NumberValue()); |
| -} |
| - |
| // Convert a value to a double precision float, which might fail. |
| double toDoubleSlow(v8::Handle<v8::Value>, ExceptionState&); |
| @@ -503,6 +491,21 @@ inline double toDouble(v8::Handle<v8::Value> value, ExceptionState& exceptionSta |
| // Convert a value to a double precision float, throwing on non-finite values. |
| double toRestrictedDouble(v8::Handle<v8::Value>, ExceptionState&); |
| +// Convert a value to a single precision float, which might fail. |
| +inline float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState) |
| +{ |
| + return static_cast<float>(toDouble(value, exceptionState)); |
| +} |
| + |
| +// Convert a value to a single precision float assuming the conversion cannot fail. |
| +inline float toFloat(v8::Local<v8::Value> value) |
|
Jens Widell
2015/03/02 13:40:25
AFAICT, this function is not used. I don't think i
|
| +{ |
| + return static_cast<float>(value->NumberValue()); |
| +} |
| + |
| +// Convert a value to a single precision float, throwing on non-finite values. |
| +float toRestrictedFloat(v8::Handle<v8::Value>, ExceptionState&); |
| + |
| // Converts a value to a String, throwing if any code unit is outside 0-255. |
| String toByteString(v8::Handle<v8::Value>, ExceptionState&); |