Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
index 516ea9297977d1458b01ed7d5cffd2e19ab9e409..ea4ff3ce628cfc898c29ad4efbb32e891f037095 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
@@ -904,6 +904,23 @@ v8::Local<v8::Object> GetEsIterator(v8::Isolate* isolate, |
return iterator.As<v8::Object>(); |
} |
+bool IsV8Sequence(v8::Isolate* isolate, |
+ v8::Local<v8::Value> value, |
+ ExceptionState& exception_state) { |
+ if (!value->IsObject()) |
+ return false; |
+ v8::TryCatch block(isolate); |
+ v8::Local<v8::Context> context = isolate->GetCurrentContext(); |
+ v8::Local<v8::Value> iterator_getter; |
+ if (!value.As<v8::Object>() |
+ ->Get(context, v8::Symbol::GetIterator(isolate)) |
+ .ToLocal(&iterator_getter)) { |
+ exception_state.RethrowV8Exception(block.Exception()); |
+ return false; |
+ } |
+ return iterator_getter->IsFunction(); |
+} |
+ |
bool AddHiddenValueToArray(v8::Isolate* isolate, |
v8::Local<v8::Object> object, |
v8::Local<v8::Value> value, |