#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_
#include <concepts>
#include <optional>
#include <type_traits>
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits.h"
#include "third_party/blink/renderer/bindings/core/v8/pass_as_span.h"
#include "third_party/blink/renderer/bindings/core/v8/script_iterator.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_trusted_html.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_trusted_script.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_trusted_script_url.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/trustedtypes/trusted_html.h"
#include "third_party/blink/renderer/core/trustedtypes/trusted_script.h"
#include "third_party/blink/renderer/core/trustedtypes/trusted_script_url.h"
#include "third_party/blink/renderer/core/trustedtypes/trusted_types_util.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_data_view.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_typed_array.h"
#include "third_party/blink/renderer/platform/bindings/bigint.h"
#include "third_party/blink/renderer/platform/bindings/exception_messages.h"
#include "third_party/blink/renderer/platform/heap/heap_traits.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "v8/include/v8-fast-api-calls.h"
namespace blink {
class CallbackFunctionBase;
class CallbackInterfaceBase;
class EventListener;
class GPUColorTargetState;
class GPURenderPassColorAttachment;
class GPUVertexBufferLayout;
class ScriptWrappable;
struct WrapperTypeInfo;
namespace bindings {
class DictionaryBase;
class EnumerationBase;
class UnionBase;
CORE_EXPORT void NativeValueTraitsInterfaceNotOfType(
const WrapperTypeInfo* wrapper_type_info,
ExceptionState& exception_state);
CORE_EXPORT void NativeValueTraitsInterfaceNotOfType(
const WrapperTypeInfo* wrapper_type_info,
int argument_index,
ExceptionState& exception_state);
class CORE_EXPORT NativeValueTraitsAnyAdapter { … };
}
template <>
struct CORE_EXPORT NativeValueTraits<IDLAny>
: public NativeValueTraitsBase<IDLAny> { … };
template <>
struct NativeValueTraits<IDLNullable<IDLAny>>;
template <>
struct CORE_EXPORT NativeValueTraits<IDLOptional<IDLAny>>
: public NativeValueTraitsBase<IDLOptional<IDLAny>> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLBoolean>
: public NativeValueTraitsBase<IDLBoolean> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLOptional<IDLBoolean>>
: public NativeValueTraitsBase<IDLOptional<IDLBoolean>> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLBigint>
: public NativeValueTraitsBase<IDLBigint> { … };
#define DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE …
DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE;
DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE;
DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE;
DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE;
DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE;
DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE;
DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE;
DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE;
#undef DEFINE_NATIVE_VALUE_TRAITS_INTEGER_TYPE
template <>
struct CORE_EXPORT NativeValueTraits<IDLDouble>
: public NativeValueTraitsBase<IDLDouble> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLUnrestrictedDouble>
: public NativeValueTraitsBase<IDLUnrestrictedDouble> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLFloat>
: public NativeValueTraitsBase<IDLFloat> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLUnrestrictedFloat>
: public NativeValueTraitsBase<IDLUnrestrictedFloat> { … };
namespace bindings {
class CORE_EXPORT NativeValueTraitsStringAdapter { … };
}
NativeValueTraits<IDLByteStringBase<mode>>;
template <>
struct CORE_EXPORT NativeValueTraits<IDLNullable<IDLByteString>>
: public NativeValueTraitsBase<IDLNullable<IDLByteString>> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLOptional<IDLByteString>>
: public NativeValueTraitsBase<IDLOptional<IDLByteString>> { … };
NativeValueTraits<IDLStringBase<mode>>;
template <>
struct CORE_EXPORT NativeValueTraits<IDLNullable<IDLString>>
: public NativeValueTraitsBase<IDLNullable<IDLString>> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLOptional<IDLString>>
: public NativeValueTraitsBase<IDLOptional<IDLString>> { … };
NativeValueTraits<IDLUSVStringBase<mode>>;
template <>
struct CORE_EXPORT NativeValueTraits<IDLNullable<IDLUSVString>>
: public NativeValueTraitsBase<IDLNullable<IDLUSVString>> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLOptional<IDLUSVString>>
: public NativeValueTraitsBase<IDLOptional<IDLUSVString>> { … };
NativeValueTraits<IDLStringStringContextTrustedHTMLBase<mode>>;
template <>
struct CORE_EXPORT
NativeValueTraits<IDLNullable<IDLStringStringContextTrustedHTML>>
: public NativeValueTraitsBase<
IDLNullable<IDLStringStringContextTrustedHTML>> { … };
NativeValueTraits<IDLStringStringContextTrustedScriptBase<mode>>;
template <>
struct CORE_EXPORT
NativeValueTraits<IDLNullable<IDLStringStringContextTrustedScript>>
: public NativeValueTraitsBase<
IDLNullable<IDLStringStringContextTrustedScript>> { … };
NativeValueTraits<IDLUSVStringStringContextTrustedScriptURLBase<mode>>;
template <>
struct CORE_EXPORT
NativeValueTraits<IDLNullable<IDLUSVStringStringContextTrustedScriptURL>>
: public NativeValueTraitsBase<
IDLNullable<IDLUSVStringStringContextTrustedScriptURL>> { … };
template <>
struct CORE_EXPORT NativeValueTraits<DOMArrayBuffer>
: public NativeValueTraitsBase<DOMArrayBuffer*> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLNullable<DOMArrayBuffer>>
: public NativeValueTraitsBase<DOMArrayBuffer*> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLAllowResizable<DOMArrayBuffer>>
: public NativeValueTraitsBase<DOMArrayBuffer*> { … };
template <>
struct CORE_EXPORT NativeValueTraits<DOMSharedArrayBuffer>
: public NativeValueTraitsBase<DOMSharedArrayBuffer*> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLNullable<DOMSharedArrayBuffer>>
: public NativeValueTraitsBase<DOMSharedArrayBuffer*> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLAllowResizable<DOMSharedArrayBuffer>>
: public NativeValueTraitsBase<DOMSharedArrayBuffer*> { … };
template <>
struct CORE_EXPORT NativeValueTraits<DOMArrayBufferBase>
: public NativeValueTraitsBase<DOMArrayBufferBase*> { … };
template <>
struct CORE_EXPORT
NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<DOMArrayBufferBase>>
: public NativeValueTraitsBase<DOMArrayBufferBase*> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLNullable<DOMArrayBufferBase>>
: public NativeValueTraitsBase<DOMArrayBufferBase*> { … };
template <>
struct CORE_EXPORT NativeValueTraits<
IDLNullable<IDLBufferSourceTypeNoSizeLimit<DOMArrayBufferBase>>>
: public NativeValueTraitsBase<DOMArrayBufferBase*> { … };
NativeValueTraits<T>;
NativeValueTraits<IDLNullable<T>>;
NativeValueTraits<NotShared<T>>;
NativeValueTraits<IDLNullable<NotShared<T>>>;
NativeValueTraits<MaybeShared<T>>;
NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>;
NativeValueTraits<IDLNullable<MaybeShared<T>>>;
NativeValueTraits<IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>;
template <>
struct CORE_EXPORT NativeValueTraits<IDLObject>
: public NativeValueTraitsBase<IDLObject> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLNullable<IDLObject>>
: public NativeValueTraitsBase<IDLNullable<IDLObject>> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLPromise>
: public NativeValueTraitsBase<IDLPromise> { … };
template <>
struct NativeValueTraits<IDLNullable<IDLPromise>>;
NativeValueTraits<IDLSequence<T>>;
namespace bindings {
template <typename T>
typename NativeValueTraits<IDLSequence<T>>::ImplType
CreateIDLSequenceFromIterator(v8::Isolate* isolate,
ScriptIterator script_iterator,
ExceptionState& exception_state) { … }
template <typename T>
typename NativeValueTraits<IDLSequence<T>>::ImplType
CreateIDLSequenceFromV8ArraySlow(v8::Isolate* isolate,
v8::Local<v8::Array> v8_array,
ExceptionState& exception_state) { … }
template <typename T>
typename NativeValueTraits<IDLSequence<T>>::ImplType
CreateIDLSequenceFromV8Array(v8::Isolate* isolate,
v8::Local<v8::Array> v8_array,
ExceptionState& exception_state) { … }
template <>
CORE_EXTERN_TEMPLATE_EXPORT
typename NativeValueTraits<IDLSequence<IDLLong>>::ImplType
CreateIDLSequenceFromV8Array<IDLLong>(v8::Isolate* isolate,
v8::Local<v8::Array> v8_array,
ExceptionState& exception_state);
}
template <typename T>
typename NativeValueTraits<IDLSequence<T>>::ImplType
NativeValueTraits<IDLSequence<T>>::NativeValue(
v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) { … }
NativeValueTraits<IDLNullable<IDLSequence<T>>>;
NativeValueTraits<IDLOptional<IDLSequence<T>>>;
NativeValueTraits<IDLArray<T>>;
NativeValueTraits<IDLNullable<IDLArray<T>>>;
NativeValueTraits<IDLRecord<K, V>>;
NativeValueTraits<T>;
NativeValueTraits<IDLNullable<T>>;
NativeValueTraits<T>;
NativeValueTraits<IDLNullable<T>>;
NativeValueTraits<T>;
NativeValueTraits<IDLNullable<T>>;
NativeValueTraits<T>;
NativeValueTraits<T>;
NativeValueTraits<IDLNullable<T>>;
NativeValueTraits<T>;
NativeValueTraits<IDLNullable<T>>;
NativeValueTraits<IDLNullable<InnerType>>;
NativeValueTraits<IDLNullable<IDLNullable<T>>>;
NativeValueTraits<IDLOptional<T>>;
NativeValueTraits<IDLOptional<T>>;
template <>
struct CORE_EXPORT NativeValueTraits<IDLDate>
: public NativeValueTraitsBase<IDLDate> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLNullable<IDLDate>>
: public NativeValueTraitsBase<IDLNullable<IDLDate>> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLEventHandler>
: public NativeValueTraitsBase<IDLEventHandler> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLOnBeforeUnloadEventHandler>
: public NativeValueTraitsBase<IDLOnBeforeUnloadEventHandler> { … };
template <>
struct CORE_EXPORT NativeValueTraits<IDLOnErrorEventHandler>
: public NativeValueTraitsBase<IDLOnErrorEventHandler> { … };
template <>
struct NativeValueTraits<IDLNullable<IDLEventHandler>>;
template <>
struct NativeValueTraits<IDLNullable<IDLOnBeforeUnloadEventHandler>>;
template <>
struct NativeValueTraits<IDLNullable<IDLOnErrorEventHandler>>;
NativeValueTraits<T>;
NativeValueTraits<T>;
NativeValueTraits<IDLOptional<T>>;
}
#endif