Index: Source/bindings/core/v8/V8Binding.h |
diff --git a/Source/bindings/core/v8/V8Binding.h b/Source/bindings/core/v8/V8Binding.h |
index 4c57f6efec798422a1517e29cc192a35c6e50f9a..6765c205918dcbf30440436df65247368444be8e 100644 |
--- a/Source/bindings/core/v8/V8Binding.h |
+++ b/Source/bindings/core/v8/V8Binding.h |
@@ -960,6 +960,17 @@ private: |
v8::TryCatch& m_block; |
}; |
+// Returns an object representing {done: true, value: undefined}. |
+v8::Local<v8::Value> v8DoneIteratorResult(v8::Isolate*); |
+ |
+// Returns an object representing {done: false, value: |value|}. |
+v8::Local<v8::Value> v8IteratorResult(v8::Isolate*, v8::Handle<v8::Value>); |
+template <typename T> |
+v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) |
+{ |
+ return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(value, scriptState->context()->Global(), scriptState->isolate())); |
+} |
+ |
} // namespace blink |
#endif // V8Binding_h |