Add toDouble() helper, and use toFloat()/toDouble() for conversions

Like we do for all integer types, use helper functions from V8Binding.h
to convert from v8::Value to native types. These helper functions throw
all exceptions via their ExceptionState& argument, which means we don't
need to initialize a v8::TryCatch in the caller.

The helpers initialize a v8::TryCatch if they call in to V8 to convert
a value, but they do not do this if the value is already of the correct
type.

Review URL: https://codereview.chromium.org/567503002

git-svn-id: svn://svn.chromium.org/blink/trunk@181812 bbb929c8-8fbe-4397-9dbb-9b2b20218538
11 files changed
tree: d0a6c5af9213896876408846caebad791026c63b
  1. third_party/