| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1806 | 1806 |
| 1807 | 1807 |
| 1808 void JSObject::LookupCallbackSetterInPrototypes(String* name, | 1808 void JSObject::LookupCallbackSetterInPrototypes(String* name, |
| 1809 LookupResult* result) { | 1809 LookupResult* result) { |
| 1810 Heap* heap = GetHeap(); | 1810 Heap* heap = GetHeap(); |
| 1811 for (Object* pt = GetPrototype(); | 1811 for (Object* pt = GetPrototype(); |
| 1812 pt != heap->null_value(); | 1812 pt != heap->null_value(); |
| 1813 pt = pt->GetPrototype()) { | 1813 pt = pt->GetPrototype()) { |
| 1814 JSObject::cast(pt)->LocalLookupRealNamedProperty(name, result); | 1814 JSObject::cast(pt)->LocalLookupRealNamedProperty(name, result); |
| 1815 if (result->IsProperty()) { | 1815 if (result->IsProperty()) { |
| 1816 if (result->IsReadOnly()) { | 1816 if (result->type() == CALLBACKS && !result->IsReadOnly()) return; |
| 1817 result->NotFound(); | 1817 // Found non-callback or read-only callback, stop looking. |
| 1818 return; | 1818 break; |
| 1819 } | |
| 1820 if (result->type() == CALLBACKS) { | |
| 1821 return; | |
| 1822 } | |
| 1823 } | 1819 } |
| 1824 } | 1820 } |
| 1825 result->NotFound(); | 1821 result->NotFound(); |
| 1826 } | 1822 } |
| 1827 | 1823 |
| 1828 | 1824 |
| 1829 MaybeObject* JSObject::SetElementWithCallbackSetterInPrototypes(uint32_t index, | 1825 MaybeObject* JSObject::SetElementWithCallbackSetterInPrototypes(uint32_t index, |
| 1830 Object* value, | 1826 Object* value, |
| 1831 bool* found) { | 1827 bool* found) { |
| 1832 Heap* heap = GetHeap(); | 1828 Heap* heap = GetHeap(); |
| (...skipping 8572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10405 if (break_point_objects()->IsUndefined()) return 0; | 10401 if (break_point_objects()->IsUndefined()) return 0; |
| 10406 // Single beak point. | 10402 // Single beak point. |
| 10407 if (!break_point_objects()->IsFixedArray()) return 1; | 10403 if (!break_point_objects()->IsFixedArray()) return 1; |
| 10408 // Multiple break points. | 10404 // Multiple break points. |
| 10409 return FixedArray::cast(break_point_objects())->length(); | 10405 return FixedArray::cast(break_point_objects())->length(); |
| 10410 } | 10406 } |
| 10411 #endif | 10407 #endif |
| 10412 | 10408 |
| 10413 | 10409 |
| 10414 } } // namespace v8::internal | 10410 } } // namespace v8::internal |
| OLD | NEW |