Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 82f93cc63fb0abeb390c11ae19d7476939504767..4b05ef31d0a6acacfd153e6a62904923471118bd 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -1783,6 +1783,17 @@ Object* JSObject::IgnoreAttributesAndSetLocalProperty( |
| && !Top::MayNamedAccess(this, name, v8::ACCESS_SET)) { |
| return SetPropertyWithFailedAccessCheck(result, name, value); |
| } |
| + |
| + if (IsJSGlobalProxy()) { |
| + Object* proto = GetPrototype(); |
| + if (proto->IsNull()) return value; |
| + ASSERT(proto->IsJSGlobalObject()); |
| + return JSObject::cast(proto)->IgnoreAttributesAndSetLocalProperty( |
| + name, |
| + value, |
| + attributes); |
| + } |
| + |
| // Check for accessor in prototype chain removed here in clone. |
| if (result->IsNotFound()) { |
| return AddProperty(name, value, attributes); |
| @@ -1803,20 +1814,15 @@ Object* JSObject::IgnoreAttributesAndSetLocalProperty( |
| return AddFastPropertyUsingMap(result->GetTransitionMap(), |
| name, |
| value); |
| - } else { |
| - return ConvertDescriptorToField(name, value, attributes); |
| } |
| + return ConvertDescriptorToField(name, value, attributes); |
| case CONSTANT_FUNCTION: |
| if (value == result->GetConstantFunction()) return value; |
| // Only replace the function if necessary. |
| return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); |
| - case CALLBACKS: |
| - return SetPropertyWithCallback(result->GetCallbackObject(), |
| - name, |
| - value, |
| - result->holder()); |
| - case INTERCEPTOR: |
| - return SetPropertyWithInterceptor(name, value, attributes); |
| + case CALLBACKS: case INTERCEPTOR: |
|
Mads Ager (chromium)
2009/04/21 13:24:16
Two lines?
|
| + // Override callback in clone |
| + return ConvertDescriptorToField(name, value, attributes); |
| case CONSTANT_TRANSITION: |
| // Replace with a MAP_TRANSITION to a new map with a FIELD, even |
| // if the value is a function. |