| Index: third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp
|
| index 0396898eebd7e46c7576985d3328c75425483b16..26aa5877b73708fb27f06e6619079a235347a037 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp
|
| @@ -68,13 +68,21 @@ void installAttributeInternal(v8::Isolate* isolate, v8::Local<v8::Object> instan
|
| return;
|
|
|
| v8::Local<v8::Name> name = v8AtomicString(isolate, attribute.name);
|
| + v8::AccessorNameGetterCallback getter = attribute.getter;
|
| + v8::AccessorNameSetterCallback setter = attribute.setter;
|
| + if (world.isMainWorld()) {
|
| + if (attribute.getterForMainWorld)
|
| + getter = attribute.getterForMainWorld;
|
| + if (attribute.setterForMainWorld)
|
| + setter = attribute.setterForMainWorld;
|
| + }
|
| v8::Local<v8::Value> data = v8::External::New(isolate, const_cast<WrapperTypeInfo*>(attribute.data));
|
|
|
| DCHECK(attribute.propertyLocationConfiguration);
|
| if (attribute.propertyLocationConfiguration & V8DOMConfiguration::OnInstance)
|
| - v8CallOrCrash(instance->DefineOwnProperty(isolate->GetCurrentContext(), name, data, static_cast<v8::PropertyAttribute>(attribute.attribute)));
|
| + v8CallOrCrash(instance->SetAccessor(isolate->GetCurrentContext(), name, getter, setter, data, static_cast<v8::AccessControl>(attribute.settings), static_cast<v8::PropertyAttribute>(attribute.attribute)));
|
| if (attribute.propertyLocationConfiguration & V8DOMConfiguration::OnPrototype)
|
| - v8CallOrCrash(prototype->DefineOwnProperty(isolate->GetCurrentContext(), name, data, static_cast<v8::PropertyAttribute>(attribute.attribute)));
|
| + v8CallOrCrash(prototype->SetAccessor(isolate->GetCurrentContext(), name, getter, setter, data, static_cast<v8::AccessControl>(attribute.settings), static_cast<v8::PropertyAttribute>(attribute.attribute)));
|
| if (attribute.propertyLocationConfiguration & V8DOMConfiguration::OnInterface)
|
| NOTREACHED();
|
| }
|
|
|