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 70e4e01aa0cec8a2978d401f1bd545033f3bbf06..d1fdc8cf56c411ca84800f2adf321cecd6e29878 100644 |
--- a/Source/bindings/tests/results/core/V8TestObject.cpp |
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp |
@@ -10061,6 +10061,47 @@ static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe |
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
} |
+static void voidMethodTreadUndefinedAsNullMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTreadUndefinedAsNull", "TestObject", info.Holder(), info.GetIsolate()); |
+ if (UNLIKELY(info.Length() < 1)) { |
+ setMinimumArityTypeError(exceptionState, 1, info.Length()); |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
+ TestObject* impl = V8TestObject::toImpl(info.Holder()); |
+ double firstArg; |
+ int secondArg; |
+ double* optionalDoubleArg = nullptr; |
+ double optionalDoubleArgValue; |
+ { |
+ firstArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
+ if (exceptionState.throwIfNeeded()) |
+ return; |
+ if (UNLIKELY(info.Length() <= 1)) { |
+ impl->voidMethodTreadUndefinedAsNull(firstArg); |
+ return; |
+ } |
+ secondArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
+ if (exceptionState.throwIfNeeded()) |
+ return; |
+ if (!isUndefinedOrNull(info[2])) { |
+ optionalDoubleArgValue = toRestrictedDouble(info.GetIsolate(), info[2], exceptionState); |
+ optionalDoubleArg = &optionalDoubleArgValue; |
+ if (exceptionState.throwIfNeeded()) |
+ return; |
+ } |
+ } |
+ impl->voidMethodTreadUndefinedAsNull(firstArg, secondArg, optionalDoubleArg); |
haraken
2015/06/17 16:01:42
Would you help me understand why we need to pass a
|
+} |
+ |
+static void voidMethodTreadUndefinedAsNullMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
+ TestObjectV8Internal::voidMethodTreadUndefinedAsNullMethod(info); |
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
+} |
+ |
static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
TestObject* impl = V8TestObject::toImpl(info.Holder()); |
@@ -12784,6 +12825,7 @@ static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { |
{"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
{"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
{"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
+ {"voidMethodTreadUndefinedAsNull", TestObjectV8Internal::voidMethodTreadUndefinedAsNullMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
{"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
{"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecutionContextVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
{"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |