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 f783f6ab25da629154318713a47ad392a43c46bb..0beb32ac29fe00354deffc1356f3121fcb0e17e3 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h |
@@ -829,6 +829,12 @@ inline bool ToV8Sequence(v8::Local<v8::Value> value, |
length = sequence_length; |
return true; |
} |
+// Validates that the passed object is a sequence type per the WebIDL spec: it |
+// has a callable @iterator. |
+// https://heycam.github.io/webidl/#es-sequence |
+CORE_EXPORT bool HasCallableIteratorSymbol(v8::Isolate*, |
+ v8::Local<v8::Value>, |
+ ExceptionState&); |
// TODO(rakuco): remove the specializations below (and consequently the |
// non-IDLBase version of NativeValueTraitsBase) once we manage to convert all |
@@ -895,7 +901,8 @@ struct NativeValueTraits<double> { |
}; |
template <> |
-struct NativeValueTraits<v8::Local<v8::Value>> { |
+struct NativeValueTraits<v8::Local<v8::Value>> |
+ : public NativeValueTraitsBase<v8::Local<v8::Value>> { |
static inline v8::Local<v8::Value> NativeValue( |
v8::Isolate* isolate, |
v8::Local<v8::Value> value, |
@@ -904,15 +911,6 @@ struct NativeValueTraits<v8::Local<v8::Value>> { |
} |
}; |
-template <> |
-struct NativeValueTraits<ScriptValue> { |
- static inline ScriptValue NativeValue(v8::Isolate* isolate, |
- v8::Local<v8::Value> value, |
- ExceptionState& exception_state) { |
- return ScriptValue(ScriptState::Current(isolate), value); |
- } |
-}; |
- |
template <typename T> |
struct NativeValueTraits<Vector<T>> { |
static inline Vector<T> NativeValue(v8::Isolate* isolate, |