| Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
|
| index 7cbb68b50aa7e3dbcdb709a1ddcdebfa2df8d91d..809d9c6c71e178e9b8f31168261a3c8ae8d3dfa9 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
|
| @@ -177,6 +177,28 @@ void V8TestIntegerIndexedGlobal::indexedPropertyDeleterCallback(uint32_t index,
|
| V8TestIntegerIndexedGlobal::indexedPropertyDeleterCustom(index, info);
|
| }
|
|
|
| +void V8TestIntegerIndexedGlobal::indexedPropertyDefinerCallback(
|
| + uint32_t index,
|
| + const v8::PropertyDescriptor& desc,
|
| + const v8::PropertyCallbackInfo<v8::Value>& info) {
|
| + // https://heycam.github.io/webidl/#legacy-platform-object-defineownproperty
|
| + // 3.9.3. [[DefineOwnProperty]]
|
| + // step 1.1. If the result of calling IsDataDescriptor(Desc) is false, then
|
| + // return false.
|
| + if (desc.has_get() || desc.has_set()) {
|
| + V8SetReturnValue(info, v8::Null(info.GetIsolate()));
|
| + if (info.ShouldThrowOnError()) {
|
| + ExceptionState exceptionState(info.GetIsolate(),
|
| + ExceptionState::kIndexedSetterContext,
|
| + "TestIntegerIndexedGlobal");
|
| + exceptionState.ThrowTypeError("Accessor properties are not allowed.");
|
| + }
|
| + return;
|
| + }
|
| +
|
| + // Return nothing and fall back to indexedPropertySetterCallback.
|
| +}
|
| +
|
| static const V8DOMConfiguration::AccessorConfiguration V8TestIntegerIndexedGlobalAccessors[] = {
|
| { "length", V8TestIntegerIndexedGlobal::lengthAttributeGetterCallback, V8TestIntegerIndexedGlobal::lengthAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
|
| };
|
| @@ -214,7 +236,15 @@ static void installV8TestIntegerIndexedGlobalTemplate(
|
| signature, V8TestIntegerIndexedGlobalMethods, WTF_ARRAY_LENGTH(V8TestIntegerIndexedGlobalMethods));
|
|
|
| // Indexed properties
|
| - v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestIntegerIndexedGlobal::indexedPropertyGetterCallback, V8TestIntegerIndexedGlobal::indexedPropertySetterCallback, nullptr, V8TestIntegerIndexedGlobal::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestIntegerIndexedGlobal>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
|
| + v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(
|
| + V8TestIntegerIndexedGlobal::indexedPropertyGetterCallback,
|
| + V8TestIntegerIndexedGlobal::indexedPropertySetterCallback,
|
| + nullptr,
|
| + V8TestIntegerIndexedGlobal::indexedPropertyDeleterCallback,
|
| + IndexedPropertyEnumerator<TestIntegerIndexedGlobal>,
|
| + V8TestIntegerIndexedGlobal::indexedPropertyDefinerCallback,
|
| + v8::Local<v8::Value>(),
|
| + v8::PropertyHandlerFlags::kNone);
|
| instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
|
|
|
| // Array iterator (@@iterator)
|
|
|