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

Unified Diff: Source/bindings/tests/results/core/V8TestObject.cpp

Issue 1150863004: toImplArguments should return HeapVector for Union types. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « Source/bindings/tests/idls/core/TestObject.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/core/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
index b5c65c73312f2c46c5b44fe901c024e6e9c48ef1..2bbf7c33ad5554ba11ae043028edb2c222dcc10e 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -7482,6 +7482,26 @@ static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback(
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
+static void voidMethodArrayOfDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayOfDoubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate());
+ TestObject* impl = V8TestObject::toImpl(info.Holder());
+ HeapVector<DoubleOrString> arg;
+ {
+ arg = toImplArguments<HeapVector<DoubleOrString>>(info, 0, exceptionState);
+ if (exceptionState.throwIfNeeded())
+ return;
+ }
+ impl->voidMethodArrayOfDoubleOrDOMStringArg(arg);
+}
+
+static void voidMethodArrayOfDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
+ TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
+}
+
static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (UNLIKELY(info.Length() < 1)) {
@@ -7730,7 +7750,7 @@ static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value>
arg3 = info[2];
if (!arg3.prepare(exceptionState))
return;
- variadic = toImplArguments<String>(info, 3, exceptionState);
+ variadic = toImplArguments<Vector<String>>(info, 3, exceptionState);
if (exceptionState.hadException())
return;
}
@@ -8587,7 +8607,7 @@ static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
TestObject* impl = V8TestObject::toImpl(info.Holder());
Vector<String> variadicStringArgs;
{
- variadicStringArgs = toImplArguments<String>(info, 0, exceptionState);
+ variadicStringArgs = toImplArguments<Vector<String>>(info, 0, exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
@@ -8616,7 +8636,7 @@ static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac
stringArg = info[0];
if (!stringArg.prepare())
return;
- variadicStringArgs = toImplArguments<String>(info, 1, exceptionState);
+ variadicStringArgs = toImplArguments<Vector<String>>(info, 1, exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
@@ -9452,7 +9472,7 @@ static void overloadedMethodL1Method(const v8::FunctionCallbackInfo<v8::Value>&
longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
- restArgs = toImplArguments<ScriptValue>(info, 1, exceptionState);
+ restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
@@ -9469,7 +9489,7 @@ static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>&
stringArg = info[0];
if (!stringArg.prepare())
return;
- restArgs = toImplArguments<ScriptValue>(info, 1, exceptionState);
+ restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
@@ -10053,7 +10073,7 @@ static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func
V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggingAccessForAllWorldsMethod", "TestObject", info.Holder(), info.GetIsolate());
- Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<v8::Local<v8::Value>>(info, 0, exceptionState);
+ Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState);
contextData->activityLogger()->logMethod("TestObject.activityLoggingAccessForAllWorldsMethod", info.Length(), loggerArgs.data());
}
TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info);
@@ -10884,7 +10904,7 @@ static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(
V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
- Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<v8::Local<v8::Value>>(info, 0, exceptionState);
+ Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState);
contextData->activityLogger()->logMethod("TestObject.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
}
TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(info);
@@ -10904,7 +10924,7 @@ static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF
V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
- Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<v8::Local<v8::Value>>(info, 0, exceptionState);
+ Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState);
contextData->activityLogger()->logMethod("TestObject.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
}
TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
@@ -10924,7 +10944,7 @@ static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall
V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
- Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<v8::Local<v8::Value>>(info, 0, exceptionState);
+ Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState);
contextData->activityLogger()->logMethod("TestObject.activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
}
TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(info);
@@ -12661,6 +12681,7 @@ static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
{"voidMethodDoubleOrNullOrDOMStringArg", TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg", TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg", TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
+ {"voidMethodArrayOfDoubleOrDOMStringArg", TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
« no previous file with comments | « Source/bindings/tests/idls/core/TestObject.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698