Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp

Issue 2791133002: bindings: Explicitly pass ValueType to toImplArray (Closed)
Patch Set: Fix tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
index 8c526ddc3e6488b4beabc536932930fe04babae6..46bb24e50a7e8d9b5b54e60556b2b232473d63f5 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
@@ -504,13 +504,12 @@ double toDoubleSlow(v8::Isolate* isolate,
ExceptionState& exceptionState) {
ASSERT(!value->IsNumber());
v8::TryCatch block(isolate);
- double doubleValue;
- if (!v8Call(value->NumberValue(isolate->GetCurrentContext()), doubleValue,
- block)) {
+ v8::Local<v8::Number> numberValue;
+ if (!value->ToNumber(isolate->GetCurrentContext()).ToLocal(&numberValue)) {
exceptionState.rethrowV8Exception(block.Exception());
return 0;
}
- return doubleValue;
+ return numberValue->Value();
}
double toRestrictedDouble(v8::Isolate* isolate,

Powered by Google App Engine
This is Rietveld 408576698