#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_ITERABLE_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_ITERABLE_H_
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_for_each_iterator_callback.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/sync_iterator_base.h"
namespace blink {
namespace bindings {
class EnumerationBase;
namespace {
template <typename T, typename unused = void>
class IDLTypeDefaultConstructible { … };
IDLTypeDefaultConstructible<T, std::enable_if_t<std::is_base_of_v<EnumerationBase, T>>>;
}
CORE_EXPORT v8::Local<v8::Object> ESCreateIterResultObject(
ScriptState* script_state,
bool done,
v8::Local<v8::Value> value);
CORE_EXPORT v8::Local<v8::Object> ESCreateIterResultObject(
ScriptState* script_state,
bool done,
v8::Local<v8::Value> item1,
v8::Local<v8::Value> item2);
template <typename IDLKeyType,
typename IDLValueType,
typename KeyType,
typename ValueType>
class PairSyncIterationSource : public SyncIteratorBase::IterationSourceBase { … };
template <typename IDLValueType, typename ValueType>
class ValueSyncIterationSource : public SyncIteratorBase::IterationSourceBase { … };
}
template <typename IDLInterface>
class PairSyncIterable { … };
template <typename IDLInterface>
class ValueSyncIterable { … };
[[nodiscard]] CORE_EXPORT bool V8UnpackIterationResult(
ScriptState* script_state,
v8::Local<v8::Object> sync_iteration_result,
v8::Local<v8::Value>* out_value,
bool* out_done);
}
#endif