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 b8a65a94c9e87f6f44c9c395e4984802f8adb1f4..14153ac35aaf1231f270c3599b9646d460d53c69 100644 |
--- a/Source/bindings/tests/results/core/V8TestInterface3.cpp |
+++ b/Source/bindings/tests/results/core/V8TestInterface3.cpp |
@@ -11,10 +11,12 @@ |
#include "bindings/core/v8/ScriptState.h" |
#include "bindings/core/v8/ScriptValue.h" |
#include "bindings/core/v8/V8DOMConfiguration.h" |
+#include "bindings/core/v8/V8Document.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 "bindings/tests/idls/core/TestPartialInterface4.h" |
#include "core/dom/ContextFeatures.h" |
#include "core/dom/Document.h" |
#include "platform/RuntimeEnabledFeatures.h" |
@@ -33,6 +35,27 @@ const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra |
namespace TestInterface3V8Internal { |
+static void voidMethodDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ if (UNLIKELY(info.Length() < 1)) { |
+ V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodDocument", "TestInterface3", 1, info.Length()), info.GetIsolate()); |
+ return; |
+ } |
+ TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
+ Document* document; |
+ { |
+ document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
+ } |
+ impl->voidMethodDocument(document); |
+} |
+ |
+static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
+ TestInterface3V8Internal::voidMethodDocumentMethod(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
+} |
+ |
static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "TestInterface3", info.Holder(), info.GetIsolate()); |
@@ -53,6 +76,39 @@ static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
} |
+#if ENABLE(BAR) |
+static void voidMethodDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDocument", "TestInterface3", info.Holder(), info.GetIsolate()); |
+ if (UNLIKELY(info.Length() < 2)) { |
+ setMinimumArityTypeError(exceptionState, 2, info.Length()); |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
+ Document* document; |
+ double d; |
+ { |
+ document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
+ if (!document) { |
+ exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
+ TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(d, toRestrictedDouble(info[1], exceptionState), exceptionState); |
+ } |
+ TestPartialInterface4::voidMethodDocument(document, d); |
+} |
+#endif // ENABLE(BAR) |
+ |
+#if ENABLE(BAR) |
+static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
+ TestInterface3V8Internal::voidMethodDocumentMethod(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
+} |
+#endif // ENABLE(BAR) |
+ |
static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "TestInterface3", info.Holder(), info.GetIsolate()); |
@@ -206,6 +262,10 @@ static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A |
} // namespace TestInterface3V8Internal |
+static const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = { |
+ {"voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
+}; |
+ |
static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate) |
{ |
functionTemplate->ReadOnlyPrototype(); |
@@ -214,7 +274,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(); |
@@ -237,6 +297,12 @@ static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> func |
}; |
V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignature, v8::None, keysMethodConfiguration); |
} |
+#if ENABLE(BAR) |
+ const V8DOMConfiguration::MethodConfiguration voidMethodDocumentMethodConfiguration = { |
+ "voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts, |
+ }; |
+ V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::Signature>(), v8::None, voidMethodDocumentMethodConfiguration); |
+#endif // ENABLE(BAR) |
if (RuntimeEnabledFeatures::featureNameEnabled()) { |
const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration = { |
"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |