OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 return SetPropertyWithFailedAccessCheck(result, name, value); | 1592 return SetPropertyWithFailedAccessCheck(result, name, value); |
1593 } | 1593 } |
1594 | 1594 |
1595 if (IsJSGlobalProxy()) { | 1595 if (IsJSGlobalProxy()) { |
1596 Object* proto = GetPrototype(); | 1596 Object* proto = GetPrototype(); |
1597 if (proto->IsNull()) return value; | 1597 if (proto->IsNull()) return value; |
1598 ASSERT(proto->IsJSGlobalObject()); | 1598 ASSERT(proto->IsJSGlobalObject()); |
1599 return JSObject::cast(proto)->SetProperty(result, name, value, attributes); | 1599 return JSObject::cast(proto)->SetProperty(result, name, value, attributes); |
1600 } | 1600 } |
1601 | 1601 |
1602 if (result->IsNotFound() || !result->IsProperty()) { | 1602 if (!result->IsProperty() && !IsJSContextExtensionObject()) { |
1603 // We could not find a local property so let's check whether there is an | 1603 // We could not find a local property so let's check whether there is an |
1604 // accessor that wants to handle the property. | 1604 // accessor that wants to handle the property. |
1605 LookupResult accessor_result; | 1605 LookupResult accessor_result; |
1606 LookupCallbackSetterInPrototypes(name, &accessor_result); | 1606 LookupCallbackSetterInPrototypes(name, &accessor_result); |
1607 if (accessor_result.IsValid()) { | 1607 if (accessor_result.IsValid()) { |
1608 return SetPropertyWithCallback(accessor_result.GetCallbackObject(), | 1608 return SetPropertyWithCallback(accessor_result.GetCallbackObject(), |
1609 name, | 1609 name, |
1610 value, | 1610 value, |
1611 accessor_result.holder()); | 1611 accessor_result.holder()); |
1612 } | 1612 } |
(...skipping 5402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7015 // No break point. | 7015 // No break point. |
7016 if (break_point_objects()->IsUndefined()) return 0; | 7016 if (break_point_objects()->IsUndefined()) return 0; |
7017 // Single beak point. | 7017 // Single beak point. |
7018 if (!break_point_objects()->IsFixedArray()) return 1; | 7018 if (!break_point_objects()->IsFixedArray()) return 1; |
7019 // Multiple break points. | 7019 // Multiple break points. |
7020 return FixedArray::cast(break_point_objects())->length(); | 7020 return FixedArray::cast(break_point_objects())->length(); |
7021 } | 7021 } |
7022 | 7022 |
7023 | 7023 |
7024 } } // namespace v8::internal | 7024 } } // namespace v8::internal |
OLD | NEW |