Index: Source/bindings/core/v8/ScriptValue.h |
diff --git a/Source/bindings/core/v8/ScriptValue.h b/Source/bindings/core/v8/ScriptValue.h |
index e1e43094974dee935c6fd87052f4472dd38d9234..6c4845b928196546a4a99a6761630caaccb28691 100644 |
--- a/Source/bindings/core/v8/ScriptValue.h |
+++ b/Source/bindings/core/v8/ScriptValue.h |
@@ -44,6 +44,12 @@ class JSONValue; |
class ScriptValue final { |
public: |
+ template<typename T> |
+ static ScriptValue from(ScriptState* scriptState, T value) |
+ { |
+ return ScriptValue(scriptState, toV8(value, scriptState->context()->Global(), scriptState->isolate())); |
+ } |
+ |
ScriptValue() { } |
ScriptValue(ScriptState* scriptState, v8::Handle<v8::Value> value) |