| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2959 // Ignore getters and setters on pixel and external array | 2959 // Ignore getters and setters on pixel and external array |
| 2960 // elements. | 2960 // elements. |
| 2961 return Heap::undefined_value(); | 2961 return Heap::undefined_value(); |
| 2962 case DICTIONARY_ELEMENTS: | 2962 case DICTIONARY_ELEMENTS: |
| 2963 break; | 2963 break; |
| 2964 default: | 2964 default: |
| 2965 UNREACHABLE(); | 2965 UNREACHABLE(); |
| 2966 break; | 2966 break; |
| 2967 } | 2967 } |
| 2968 | 2968 |
| 2969 SetElementCallback(index, info, info->property_attributes()); | 2969 Object* ok = SetElementCallback(index, info, info->property_attributes()); |
| 2970 if (ok->IsFailure()) return ok; |
| 2970 } else { | 2971 } else { |
| 2971 // Lookup the name. | 2972 // Lookup the name. |
| 2972 LookupResult result; | 2973 LookupResult result; |
| 2973 LocalLookup(name, &result); | 2974 LocalLookup(name, &result); |
| 2974 // ES5 forbids turning a property into an accessor if it's not | 2975 // ES5 forbids turning a property into an accessor if it's not |
| 2975 // configurable (that is IsDontDelete in ES3 and v8), see 8.6.1 (Table 5). | 2976 // configurable (that is IsDontDelete in ES3 and v8), see 8.6.1 (Table 5). |
| 2976 if (result.IsProperty() && (result.IsReadOnly() || result.IsDontDelete())) { | 2977 if (result.IsProperty() && (result.IsReadOnly() || result.IsDontDelete())) { |
| 2977 return Heap::undefined_value(); | 2978 return Heap::undefined_value(); |
| 2978 } | 2979 } |
| 2979 SetPropertyCallback(name, info, info->property_attributes()); | 2980 Object* ok = SetPropertyCallback(name, info, info->property_attributes()); |
| 2981 if (ok->IsFailure()) return ok; |
| 2980 } | 2982 } |
| 2981 | 2983 |
| 2982 return this; | 2984 return this; |
| 2983 } | 2985 } |
| 2984 | 2986 |
| 2985 | 2987 |
| 2986 Object* JSObject::LookupAccessor(String* name, bool is_getter) { | 2988 Object* JSObject::LookupAccessor(String* name, bool is_getter) { |
| 2987 // Make sure that the top context does not change when doing callbacks or | 2989 // Make sure that the top context does not change when doing callbacks or |
| 2988 // interceptor calls. | 2990 // interceptor calls. |
| 2989 AssertNoContextChange ncc; | 2991 AssertNoContextChange ncc; |
| (...skipping 5779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8769 if (break_point_objects()->IsUndefined()) return 0; | 8771 if (break_point_objects()->IsUndefined()) return 0; |
| 8770 // Single beak point. | 8772 // Single beak point. |
| 8771 if (!break_point_objects()->IsFixedArray()) return 1; | 8773 if (!break_point_objects()->IsFixedArray()) return 1; |
| 8772 // Multiple break points. | 8774 // Multiple break points. |
| 8773 return FixedArray::cast(break_point_objects())->length(); | 8775 return FixedArray::cast(break_point_objects())->length(); |
| 8774 } | 8776 } |
| 8775 #endif | 8777 #endif |
| 8776 | 8778 |
| 8777 | 8779 |
| 8778 } } // namespace v8::internal | 8780 } } // namespace v8::internal |
| OLD | NEW |