Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp

Issue 2749253002: bindings: Expand typedefs before generating union files. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
index f8c99941294c1217d3ea52b75d6c8c127238e675..2d7e39de8ddfbf42ef0a99b32318c1b36c0881ea 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
@@ -11,15 +11,9 @@
// clang-format off
#include "V8TestTypedefs.h"
-#include "bindings/core/v8/ByteStringOrNodeList.h"
-#include "bindings/core/v8/ByteStringSequenceSequenceOrByteStringByteStringRecord.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/IDLTypes.h"
-#include "bindings/core/v8/LongSequenceOrEvent.h"
#include "bindings/core/v8/NativeValueTraitsImpl.h"
-#include "bindings/core/v8/NodeOrLongSequenceOrEventOrXMLHttpRequestOrStringOrStringByteStringOrNodeListRecord.h"
-#include "bindings/core/v8/StringOrDouble.h"
-#include "bindings/core/v8/TestInterfaceOrTestInterfaceEmpty.h"
#include "bindings/core/v8/V8DOMConfiguration.h"
#include "bindings/core/v8/V8Event.h"
#include "bindings/core/v8/V8Node.h"
@@ -30,7 +24,6 @@
#include "bindings/core/v8/V8TestInterfaceEmpty.h"
#include "bindings/core/v8/V8TestObject.h"
#include "bindings/core/v8/V8XMLHttpRequest.h"
-#include "bindings/core/v8/XMLHttpRequestOrString.h"
#include "core/dom/Document.h"
#include "core/dom/NameNodeList.h"
#include "core/dom/NodeList.h"
@@ -334,6 +327,24 @@ static void voidMethodNestedUnionTypeMethod(const v8::FunctionCallbackInfo<v8::V
impl->voidMethodNestedUnionType(arg);
}
+static void voidMethodUnionWithTypedefMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestTypedefs", "voidMethodUnionWithTypedef");
+
+ TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
+
+ if (UNLIKELY(info.Length() < 1)) {
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ return;
+ }
+
+ UnsignedLongLongOrBooleanOrTestCallbackInterface arg;
+ V8UnsignedLongLongOrBooleanOrTestCallbackInterface::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState);
+ if (exceptionState.hadException())
+ return;
+
+ impl->voidMethodUnionWithTypedef(arg);
+}
+
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) {
if (UNLIKELY(info.Length() < 1)) {
V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToConstruct("TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())));
@@ -425,6 +436,10 @@ void V8TestTypedefs::voidMethodNestedUnionTypeMethodCallback(const v8::FunctionC
TestTypedefsV8Internal::voidMethodNestedUnionTypeMethod(info);
}
+void V8TestTypedefs::voidMethodUnionWithTypedefMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ TestTypedefsV8Internal::voidMethodUnionWithTypedefMethod(info);
+}
+
// Suppress warning: global constructors, because AttributeConfiguration is trivial
// and does not depend on another global objects.
#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
@@ -457,6 +472,7 @@ const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = {
{"unionWithRecordMethod", V8TestTypedefs::unionWithRecordMethodMethodCallback, nullptr, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess},
{"methodThatReturnsRecord", V8TestTypedefs::methodThatReturnsRecordMethodCallback, nullptr, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess},
{"voidMethodNestedUnionType", V8TestTypedefs::voidMethodNestedUnionTypeMethodCallback, nullptr, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess},
+ {"voidMethodUnionWithTypedef", V8TestTypedefs::voidMethodUnionWithTypedefMethodCallback, nullptr, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess},
};
void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {

Powered by Google App Engine
This is Rietveld 408576698