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

Unified Diff: Source/bindings/core/v8/V8Binding.h

Issue 1009503003: [bindings] Introduce ScriptValue.to<T> to convert to native values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/bindings/core/v8/V8Binding.h
diff --git a/Source/bindings/core/v8/V8Binding.h b/Source/bindings/core/v8/V8Binding.h
index 721c9a1167cc9edd9602e22d8084c1c1fefc4b8d..81b41949ba580daf4a31f885b0711ac17897a844 100644
--- a/Source/bindings/core/v8/V8Binding.h
+++ b/Source/bindings/core/v8/V8Binding.h
@@ -804,6 +804,12 @@ inline bool toV8Sequence(v8::Handle<v8::Value> value, uint32_t& length, v8::Isol
return true;
}
+template <typename T>
+T script_value_cast(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState)
haraken 2015/03/14 01:27:19 Why does this need to be defined in V8Binding.h? C
+{
+ return NativeValueTraits<T>::nativeValue(value, isolate, exceptionState);
+}
+
template<>
struct NativeValueTraits<String> {
static inline String nativeValue(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState)

Powered by Google App Engine
This is Rietveld 408576698