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 0dadc80056467bc65d6d4d9242a4c82a32f150e6..b6cba1a59ab81516758a485331360efe1bc2d9ec 100644 |
--- a/Source/bindings/tests/results/core/V8TestInterface3.cpp |
+++ b/Source/bindings/tests/results/core/V8TestInterface3.cpp |
@@ -32,6 +32,66 @@ const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra |
namespace TestInterface3V8Internal { |
+static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "TestInterface3", info.Holder(), info.GetIsolate()); |
+ TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
+ RawPtr<Iterator> result = impl->keys(scriptState, exceptionState); |
+ if (exceptionState.hadException()) { |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
+ v8SetReturnValue(info, result.release()); |
+} |
+ |
+static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
+ TestInterface3V8Internal::keysMethod(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
+} |
+ |
+static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "TestInterface3", info.Holder(), info.GetIsolate()); |
+ TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
+ RawPtr<Iterator> result = impl->values(scriptState, exceptionState); |
+ if (exceptionState.hadException()) { |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
+ v8SetReturnValue(info, result.release()); |
+} |
+ |
+static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
+ TestInterface3V8Internal::valuesMethod(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
+} |
+ |
+static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "TestInterface3", info.Holder(), info.GetIsolate()); |
+ TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
+ ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
+ RawPtr<Iterator> result = impl->entries(scriptState, exceptionState); |
+ if (exceptionState.hadException()) { |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
+ v8SetReturnValue(info, result.release()); |
+} |
+ |
+static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
+ TestInterface3V8Internal::entriesMethod(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
+} |
+ |
static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface3", info.Holder(), info.GetIsolate()); |
@@ -110,6 +170,12 @@ static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A |
} // namespace TestInterface3V8Internal |
+static const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = { |
+ {"keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
+ {"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
+ {"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
+}; |
+ |
static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate) |
{ |
functionTemplate->ReadOnlyPrototype(); |
@@ -118,7 +184,7 @@ static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> func |
defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface3", v8::Local<v8::FunctionTemplate>(), V8TestInterface3::internalFieldCount, |
0, 0, |
0, 0, |
- 0, 0); |
+ V8TestInterface3Methods, WTF_ARRAY_LENGTH(V8TestInterface3Methods)); |
v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceTemplate(); |
ALLOW_UNUSED_LOCAL(instanceTemplate); |
v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->PrototypeTemplate(); |