Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.h |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h |
index 1df7fae7726c68025efbae99fb7607a1ef7a794a..4cc67b2ff436060e9e2edb7141d74f438d08b7b7 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h |
@@ -975,6 +975,7 @@ struct NativeValueTraits<v8::Local<v8::Value>> { |
template <> |
struct NativeValueTraits<ScriptValue> { |
+ using ImplType = ScriptValue; |
static inline ScriptValue nativeValue(v8::Isolate* isolate, |
v8::Local<v8::Value> value, |
ExceptionState& exceptionState) { |
@@ -982,6 +983,17 @@ struct NativeValueTraits<ScriptValue> { |
} |
}; |
+class Promise; |
+template <> |
+struct NativeValueTraits<Promise> { |
+ using ImplType = ScriptPromise; |
+ static inline ScriptPromise nativeValue(v8::Isolate* isolate, |
+ v8::Local<v8::Value> value, |
+ ExceptionState& exceptionState) { |
+ return ScriptPromise::cast(ScriptState::current(isolate), value); |
+ } |
+}; |
+ |
template <typename T> |
struct NativeValueTraits<Vector<T>> { |
static inline Vector<T> nativeValue(v8::Isolate* isolate, |