Index: Source/bindings/core/v8/ScriptValue.h |
diff --git a/Source/bindings/core/v8/ScriptValue.h b/Source/bindings/core/v8/ScriptValue.h |
index ca543728397bfa153f717b246367ab07a5b15eb2..4a727dd732a30cdab4624dc4af2e5e6e06244db8 100644 |
--- a/Source/bindings/core/v8/ScriptValue.h |
+++ b/Source/bindings/core/v8/ScriptValue.h |
@@ -31,6 +31,7 @@ |
#ifndef ScriptValue_h |
#define ScriptValue_h |
+#include "bindings/core/v8/NativeValueTraits.h" |
#include "bindings/core/v8/ScriptState.h" |
#include "bindings/core/v8/SharedPersistent.h" |
#include "core/CoreExport.h" |
@@ -51,6 +52,12 @@ public: |
return ScriptValue(scriptState, toV8(value, scriptState->context()->Global(), scriptState->isolate())); |
} |
+ template<typename T> |
+ inline T to(ExceptionState& exceptionState) const |
+ { |
+ return NativeValueTraits<T>::nativeValue(v8Value(), isolate(), exceptionState); |
+ } |
+ |
ScriptValue() { } |
ScriptValue(ScriptState* scriptState, v8::Handle<v8::Value> value) |