Chromium Code Reviews| 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 6152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6163 return InterceptorInfo::cast(result); | 6163 return InterceptorInfo::cast(result); |
| 6164 } | 6164 } |
| 6165 | 6165 |
| 6166 | 6166 |
| 6167 Object* JSObject::GetPropertyPostInterceptor(JSObject* receiver, | 6167 Object* JSObject::GetPropertyPostInterceptor(JSObject* receiver, |
| 6168 String* name, | 6168 String* name, |
| 6169 PropertyAttributes* attributes) { | 6169 PropertyAttributes* attributes) { |
| 6170 // Check local property in holder, ignore interceptor. | 6170 // Check local property in holder, ignore interceptor. |
| 6171 LookupResult result; | 6171 LookupResult result; |
| 6172 LocalLookupRealNamedProperty(name, &result); | 6172 LocalLookupRealNamedProperty(name, &result); |
| 6173 if (result.IsValid()) return GetProperty(receiver, &result, name, attributes); | 6173 if (result.IsValid()) { |
| 6174 Object* p = GetProperty(receiver, &result, name, attributes); | |
| 6175 // Successful name lookup doesn't mean the value is there, because the | |
|
Mads Ager (chromium)
2010/02/18 08:29:30
There is something fishy going on here. The resul
| |
| 6176 // name could've been introduced by the interceptor. Only return property | |
| 6177 // if it's not absent. | |
| 6178 if (*attributes != ABSENT) return p; | |
| 6179 } | |
| 6174 // Continue searching via the prototype chain. | 6180 // Continue searching via the prototype chain. |
| 6175 Object* pt = GetPrototype(); | 6181 Object* pt = GetPrototype(); |
| 6176 *attributes = ABSENT; | 6182 *attributes = ABSENT; |
| 6177 if (pt == Heap::null_value()) return Heap::undefined_value(); | 6183 if (pt == Heap::null_value()) return Heap::undefined_value(); |
| 6178 return pt->GetPropertyWithReceiver(receiver, name, attributes); | 6184 return pt->GetPropertyWithReceiver(receiver, name, attributes); |
| 6179 } | 6185 } |
| 6180 | 6186 |
| 6181 | 6187 |
| 6182 Object* JSObject::GetLocalPropertyPostInterceptor( | 6188 Object* JSObject::GetLocalPropertyPostInterceptor( |
| 6183 JSObject* receiver, | 6189 JSObject* receiver, |
| (...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8300 if (break_point_objects()->IsUndefined()) return 0; | 8306 if (break_point_objects()->IsUndefined()) return 0; |
| 8301 // Single beak point. | 8307 // Single beak point. |
| 8302 if (!break_point_objects()->IsFixedArray()) return 1; | 8308 if (!break_point_objects()->IsFixedArray()) return 1; |
| 8303 // Multiple break points. | 8309 // Multiple break points. |
| 8304 return FixedArray::cast(break_point_objects())->length(); | 8310 return FixedArray::cast(break_point_objects())->length(); |
| 8305 } | 8311 } |
| 8306 #endif | 8312 #endif |
| 8307 | 8313 |
| 8308 | 8314 |
| 8309 } } // namespace v8::internal | 8315 } } // namespace v8::internal |
| OLD | NEW |