| Index: Source/bindings/tests/results/core/V8TestInterface3.cpp
|
| diff --git a/Source/bindings/tests/results/core/V8TestInterface3.cpp b/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
| index 049d2c820d3a7519252955a9e0692c91e59e7690..0dadc80056467bc65d6d4d9242a4c82a32f150e6 100644
|
| --- a/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
| +++ b/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
| @@ -8,8 +8,10 @@
|
| #include "V8TestInterface3.h"
|
|
|
| #include "bindings/core/v8/ExceptionState.h"
|
| +#include "bindings/core/v8/ScriptState.h"
|
| #include "bindings/core/v8/V8DOMConfiguration.h"
|
| #include "bindings/core/v8/V8HiddenValue.h"
|
| +#include "bindings/core/v8/V8Iterator.h"
|
| #include "bindings/core/v8/V8Node.h"
|
| #include "bindings/core/v8/V8ObjectConstructor.h"
|
| #include "core/dom/ContextFeatures.h"
|
| @@ -30,6 +32,26 @@ const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra
|
|
|
| namespace TestInterface3V8Internal {
|
|
|
| +static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface3", info.Holder(), info.GetIsolate());
|
| + TestInterface3* impl = V8TestInterface3::toImpl(info.Holder());
|
| + ScriptState* scriptState = ScriptState::current(info.GetIsolate());
|
| + RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState);
|
| + if (exceptionState.hadException()) {
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| + }
|
| + v8SetReturnValue(info, result.release());
|
| +}
|
| +
|
| +static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestInterface3V8Internal::iteratorMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty");
|
| @@ -103,6 +125,8 @@ static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> func
|
| ALLOW_UNUSED_LOCAL(prototypeTemplate);
|
| functionTemplate->InstanceTemplate()->SetHandler(v8::IndexedPropertyHandlerConfiguration(TestInterface3V8Internal::indexedPropertyGetterCallback, TestInterface3V8Internal::indexedPropertySetterCallback, 0, TestInterface3V8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface3>));
|
| functionTemplate->InstanceTemplate()->SetHandler(v8::NamedPropertyHandlerConfiguration(TestInterface3V8Internal::namedPropertyGetterCallback, TestInterface3V8Internal::namedPropertySetterCallback, TestInterface3V8Internal::namedPropertyQueryCallback, TestInterface3V8Internal::namedPropertyDeleterCallback, TestInterface3V8Internal::namedPropertyEnumeratorCallback));
|
| + static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
|
| + V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::DontDelete, symbolKeyedIteratorConfiguration, isolate);
|
|
|
| // Custom toString template
|
| functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate());
|
|
|