summaryrefslogtreecommitdiff
path: root/chromium/gin/converter.cc
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-08 14:30:41 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-12 13:49:54 +0200
commitab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch)
tree498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/gin/converter.cc
parent4ce69f7403811819800e7c5ae1318b2647e778d1 (diff)
downloadqtwebengine-chromium-ab0a50979b9eb4dfa3320eff7e187e41efedf7a9.tar.gz
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/gin/converter.cc')
-rw-r--r--chromium/gin/converter.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/gin/converter.cc b/chromium/gin/converter.cc
index 54736f95aaf..07437b7edc2 100644
--- a/chromium/gin/converter.cc
+++ b/chromium/gin/converter.cc
@@ -79,6 +79,18 @@ bool Converter<uint64_t>::FromV8(Isolate* isolate, Handle<Value> val,
return true;
}
+Handle<Value> Converter<float>::ToV8(Isolate* isolate, float val) {
+ return Number::New(isolate, val).As<Value>();
+}
+
+bool Converter<float>::FromV8(Isolate* isolate, Handle<Value> val,
+ float* out) {
+ if (!val->IsNumber())
+ return false;
+ *out = static_cast<float>(val->NumberValue());
+ return true;
+}
+
Handle<Value> Converter<double>::ToV8(Isolate* isolate, double val) {
return Number::New(isolate, val).As<Value>();
}