Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp |
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp |
| index 2f8ff43ab4a923e8c77d4374357639e62dda7230..ef06c82aa74b0be640259385404fd7a32630fa21 100644 |
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp |
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp |
| @@ -1590,6 +1590,64 @@ static void floatArrayAttributeAttributeSetterCallback(const v8::FunctionCallbac |
| TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info); |
| } |
| +static void stringFrozenArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + v8::Local<v8::Object> holder = info.Holder(); |
| + TestObject* impl = V8TestObject::toImpl(holder); |
| + v8SetReturnValue(info, toV8(impl->stringFrozenArrayAttribute(), info.Holder(), info.GetIsolate())); |
|
bashi
2016/04/14 05:27:49
An easy option for making FrozenArrays references
Yuki
2016/04/14 05:54:41
I was thinking the same thing, but my question is
bashi
2016/04/14 07:34:30
Chatted offline. Conclusion is that we don't need
|
| +} |
| + |
| +static void stringFrozenArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + TestObjectV8Internal::stringFrozenArrayAttributeAttributeGetter(info); |
| +} |
| + |
| +static void stringFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + v8::Local<v8::Object> holder = info.Holder(); |
| + ExceptionState exceptionState(ExceptionState::SetterContext, "stringFrozenArrayAttribute", "TestObject", holder, info.GetIsolate()); |
| + TestObject* impl = V8TestObject::toImpl(holder); |
| + Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIsolate(), exceptionState); |
| + if (exceptionState.throwIfNeeded()) |
| + return; |
| + impl->setStringFrozenArrayAttribute(cppValue); |
| +} |
| + |
| +static void stringFrozenArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + v8::Local<v8::Value> v8Value = info[0]; |
| + TestObjectV8Internal::stringFrozenArrayAttributeAttributeSetter(v8Value, info); |
| +} |
| + |
| +static void testInterfaceEmptyFrozenArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + v8::Local<v8::Object> holder = info.Holder(); |
| + TestObject* impl = V8TestObject::toImpl(holder); |
| + v8SetReturnValue(info, toV8(impl->testInterfaceEmptyFrozenArrayAttribute(), info.Holder(), info.GetIsolate())); |
| +} |
| + |
| +static void testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeGetter(info); |
| +} |
| + |
| +static void testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + v8::Local<v8::Object> holder = info.Holder(); |
| + ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceEmptyFrozenArrayAttribute", "TestObject", holder, info.GetIsolate()); |
| + TestObject* impl = V8TestObject::toImpl(holder); |
| + HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState)); |
| + if (exceptionState.throwIfNeeded()) |
| + return; |
| + impl->setTestInterfaceEmptyFrozenArrayAttribute(cppValue); |
| +} |
| + |
| +static void testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + v8::Local<v8::Value> v8Value = info[0]; |
| + TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8Value, info); |
| +} |
| + |
| static void stringOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| @@ -6325,6 +6383,63 @@ static void voidMethodNullableSequenceLongArgMethodCallback(const v8::FunctionCa |
| TestObjectV8Internal::voidMethodNullableSequenceLongArgMethod(info); |
| } |
| +static void longFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| + v8SetReturnValue(info, toV8(impl->longFrozenArrayMethod(), info.Holder(), info.GetIsolate())); |
| +} |
| + |
| +static void longFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + TestObjectV8Internal::longFrozenArrayMethodMethod(info); |
| +} |
| + |
| +static void voidMethodStringFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| + if (UNLIKELY(info.Length() < 1)) { |
| + setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| + exceptionState.throwIfNeeded(); |
| + return; |
| + } |
| + TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| + Vector<String> stringFrozenArrayArg; |
| + { |
| + stringFrozenArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
| + if (exceptionState.throwIfNeeded()) |
| + return; |
| + } |
| + impl->voidMethodStringFrozenArrayMethod(stringFrozenArrayArg); |
| +} |
| + |
| +static void voidMethodStringFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethod(info); |
| +} |
| + |
| +static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| + if (UNLIKELY(info.Length() < 1)) { |
| + setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| + exceptionState.throwIfNeeded(); |
| + return; |
| + } |
| + TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| + HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyFrozenArrayArg; |
| + { |
| + testInterfaceEmptyFrozenArrayArg = (toMemberNativeArray<TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
| + if (exceptionState.throwIfNeeded()) |
| + return; |
| + } |
| + impl->voidMethodTestInterfaceEmptyFrozenArrayMethod(testInterfaceEmptyFrozenArrayArg); |
| +} |
| + |
| +static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| +{ |
| + TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(info); |
| +} |
| + |
| static void nullableLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| @@ -11420,6 +11535,8 @@ const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = { |
| {"stringArrayAttribute", TestObjectV8Internal::stringArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceEmptyArrayAttribute", TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"floatArrayAttribute", TestObjectV8Internal::floatArrayAttributeAttributeGetterCallback, TestObjectV8Internal::floatArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| + {"stringFrozenArrayAttribute", TestObjectV8Internal::stringFrozenArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringFrozenArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| + {"testInterfaceEmptyFrozenArrayAttribute", TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"stringOrNullAttribute", TestObjectV8Internal::stringOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::stringOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"longOrNullAttribute", TestObjectV8Internal::longOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::longOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceOrNullAttribute", TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| @@ -11602,6 +11719,9 @@ const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { |
| {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodSequenceSequenceDOMStringArg", TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodNullableSequenceLongArg", TestObjectV8Internal::voidMethodNullableSequenceLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| + {"longFrozenArrayMethod", TestObjectV8Internal::longFrozenArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| + {"voidMethodStringFrozenArrayMethod", TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| + {"voidMethodTestInterfaceEmptyFrozenArrayMethod", TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nullableLongMethod", TestObjectV8Internal::nullableLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nullableStringMethod", TestObjectV8Internal::nullableStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nullableTestInterfaceMethod", TestObjectV8Internal::nullableTestInterfaceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |