Index: Source/bindings/core/v8/V8Binding.cpp |
diff --git a/Source/bindings/core/v8/V8Binding.cpp b/Source/bindings/core/v8/V8Binding.cpp |
index e29d86307ffcf5300fd99e85ec56de01740bc1bc..4c18ce67c10d81b73d8be8b9a875abdba2555b98 100644 |
--- a/Source/bindings/core/v8/V8Binding.cpp |
+++ b/Source/bindings/core/v8/V8Binding.cpp |
@@ -407,27 +407,18 @@ uint32_t toUInt32(v8::Handle<v8::Value> value) |
return toUInt32(value, NormalConversion, exceptionState); |
} |
-int64_t toInt64(v8::Handle<v8::Value> value, IntegerConversionConfiguration configuration, ExceptionState& exceptionState) |
+int64_t toInt64Slow(v8::Handle<v8::Value> value, IntegerConversionConfiguration configuration, ExceptionState& exceptionState) |
{ |
- // Clamping not supported for int64_t/long long int. See Source/wtf/MathExtras.h. |
- ASSERT(configuration != Clamp); |
- |
- // Fast case. The value is a 32-bit integer. |
- if (value->IsInt32()) |
- return value->Int32Value(); |
+ ASSERT(!value->IsInt32()); |
v8::Local<v8::Number> numberObject; |
- if (value->IsNumber()) { |
- numberObject = value.As<v8::Number>(); |
- } else { |
- v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
- // Can the value be converted to a number? |
- v8::TryCatch block(isolate); |
- numberObject = value->ToNumber(isolate); |
- if (block.HasCaught()) { |
- exceptionState.rethrowV8Exception(block.Exception()); |
- return 0; |
- } |
+ v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
+ // Can the value be converted to a number? |
+ v8::TryCatch block(isolate); |
+ numberObject = value->ToNumber(isolate); |
+ if (block.HasCaught()) { |
+ exceptionState.rethrowV8Exception(block.Exception()); |
+ return 0; |
} |
ASSERT(!numberObject.IsEmpty()); |