| 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 3977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3988 if (result->IsProperty()) return; | 3988 if (result->IsProperty()) return; |
| 3989 } | 3989 } |
| 3990 result->NotFound(); | 3990 result->NotFound(); |
| 3991 } | 3991 } |
| 3992 | 3992 |
| 3993 | 3993 |
| 3994 // Search object and it's prototype chain for callback properties. | 3994 // Search object and it's prototype chain for callback properties. |
| 3995 void JSObject::LookupCallback(String* name, LookupResult* result) { | 3995 void JSObject::LookupCallback(String* name, LookupResult* result) { |
| 3996 Heap* heap = GetHeap(); | 3996 Heap* heap = GetHeap(); |
| 3997 for (Object* current = this; | 3997 for (Object* current = this; |
| 3998 current != heap->null_value(); | 3998 current != heap->null_value() && current->IsJSObject(); |
| 3999 current = JSObject::cast(current)->GetPrototype()) { | 3999 current = JSObject::cast(current)->GetPrototype()) { |
| 4000 JSObject::cast(current)->LocalLookupRealNamedProperty(name, result); | 4000 JSObject::cast(current)->LocalLookupRealNamedProperty(name, result); |
| 4001 if (result->IsProperty() && result->type() == CALLBACKS) return; | 4001 if (result->IsProperty() && result->type() == CALLBACKS) return; |
| 4002 } | 4002 } |
| 4003 result->NotFound(); | 4003 result->NotFound(); |
| 4004 } | 4004 } |
| 4005 | 4005 |
| 4006 | 4006 |
| 4007 // Search for a getter or setter in an elements dictionary. Returns either | 4007 // Search for a getter or setter in an elements dictionary. Returns either |
| 4008 // undefined if the element is read-only, or the getter/setter pair (fixed | 4008 // undefined if the element is read-only, or the getter/setter pair (fixed |
| (...skipping 8171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12180 if (break_point_objects()->IsUndefined()) return 0; | 12180 if (break_point_objects()->IsUndefined()) return 0; |
| 12181 // Single break point. | 12181 // Single break point. |
| 12182 if (!break_point_objects()->IsFixedArray()) return 1; | 12182 if (!break_point_objects()->IsFixedArray()) return 1; |
| 12183 // Multiple break points. | 12183 // Multiple break points. |
| 12184 return FixedArray::cast(break_point_objects())->length(); | 12184 return FixedArray::cast(break_point_objects())->length(); |
| 12185 } | 12185 } |
| 12186 #endif | 12186 #endif |
| 12187 | 12187 |
| 12188 | 12188 |
| 12189 } } // namespace v8::internal | 12189 } } // namespace v8::internal |
| OLD | NEW |