#include "third_party/blink/renderer/bindings/core/v8/generated_code_helper.h"
#include "third_party/blink/renderer/bindings/core/v8/capture_source_location.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_element.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_set_return_value_for_core.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/range.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/html/custom/ce_reactions_scope.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/xml/dom_parser.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/bindings/v8_per_context_data.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
namespace {
enum class IgnorePause { … };
bool IsCallbackFunctionRunnableInternal(
const ScriptState* callback_relevant_script_state,
const ScriptState* incumbent_script_state,
IgnorePause ignore_pause) { … }
}
bool IsCallbackFunctionRunnable(
const ScriptState* callback_relevant_script_state,
const ScriptState* incumbent_script_state) { … }
bool IsCallbackFunctionRunnableIgnoringPause(
const ScriptState* callback_relevant_script_state,
const ScriptState* incumbent_script_state) { … }
void ExceptionToRejectPromiseScope::ConvertExceptionToRejectPromise() { … }
namespace bindings {
void SetupIDLInterfaceTemplate(
v8::Isolate* isolate,
const WrapperTypeInfo* wrapper_type_info,
v8::Local<v8::ObjectTemplate> instance_template,
v8::Local<v8::ObjectTemplate> prototype_template,
v8::Local<v8::FunctionTemplate> interface_template,
v8::Local<v8::FunctionTemplate> parent_interface_template) { … }
void SetupIDLNamespaceTemplate(
v8::Isolate* isolate,
const WrapperTypeInfo* wrapper_type_info,
v8::Local<v8::ObjectTemplate> interface_template) { … }
void SetupIDLCallbackInterfaceTemplate(
v8::Isolate* isolate,
const WrapperTypeInfo* wrapper_type_info,
v8::Local<v8::FunctionTemplate> interface_template) { … }
void SetupIDLObservableArrayBackingListTemplate(
v8::Isolate* isolate,
const WrapperTypeInfo* wrapper_type_info,
v8::Local<v8::ObjectTemplate> instance_template,
v8::Local<v8::FunctionTemplate> interface_template) { … }
void SetupIDLIteratorTemplate(
v8::Isolate* isolate,
const WrapperTypeInfo* wrapper_type_info,
v8::Local<v8::ObjectTemplate> instance_template,
v8::Local<v8::ObjectTemplate> prototype_template,
v8::Local<v8::FunctionTemplate> interface_template,
v8::Intrinsic parent_intrinsic_prototype,
const char* class_string) { … }
std::optional<size_t> FindIndexInEnumStringTable(
v8::Isolate* isolate,
v8::Local<v8::Value> value,
base::span<const char* const> enum_value_table,
const char* enum_type_name,
ExceptionState& exception_state) { … }
std::optional<size_t> FindIndexInEnumStringTable(
const String& str_value,
base::span<const char* const> enum_value_table) { … }
void ReportInvalidEnumSetToAttribute(v8::Isolate* isolate,
const String& value,
const String& enum_type_name,
ExceptionState& exception_state) { … }
bool IsEsIterableObject(v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) { … }
Document* ToDocumentFromExecutionContext(ExecutionContext* execution_context) { … }
ExecutionContext* ExecutionContextFromV8Wrappable(const Range* range) { … }
ExecutionContext* ExecutionContextFromV8Wrappable(const DOMParser* parser) { … }
v8::MaybeLocal<v8::Value> CreateLegacyFactoryFunctionFunction(
ScriptState* script_state,
v8::FunctionCallback callback,
const char* func_name,
int func_length,
const WrapperTypeInfo* wrapper_type_info) { … }
void InstallUnscopablePropertyNames(
v8::Isolate* isolate,
v8::Local<v8::Context> context,
v8::Local<v8::Object> prototype_object,
base::span<const char* const> property_name_table) { … }
v8::Local<v8::Array> EnumerateIndexedProperties(v8::Isolate* isolate,
uint32_t length) { … }
template <typename IDLType,
typename ArgType,
void (Element::*MemFunc)(const QualifiedName&, ArgType)>
void PerformAttributeSetCEReactionsReflect(
const v8::FunctionCallbackInfo<v8::Value>& info,
const QualifiedName& content_attribute,
const char* interface_name,
const char* attribute_name) { … }
void PerformAttributeSetCEReactionsReflectTypeBoolean(
const v8::FunctionCallbackInfo<v8::Value>& info,
const QualifiedName& content_attribute,
const char* interface_name,
const char* attribute_name) { … }
void PerformAttributeSetCEReactionsReflectTypeString(
const v8::FunctionCallbackInfo<v8::Value>& info,
const QualifiedName& content_attribute,
const char* interface_name,
const char* attribute_name) { … }
void PerformAttributeSetCEReactionsReflectTypeStringLegacyNullToEmptyString(
const v8::FunctionCallbackInfo<v8::Value>& info,
const QualifiedName& content_attribute,
const char* interface_name,
const char* attribute_name) { … }
void PerformAttributeSetCEReactionsReflectTypeStringOrNull(
const v8::FunctionCallbackInfo<v8::Value>& info,
const QualifiedName& content_attribute,
const char* interface_name,
const char* attribute_name) { … }
CORE_EXPORT void CountWebDXFeature(v8::Isolate* isolate, WebDXFeature feature) { … }
}
}