| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/messages.h" | 5 #include "src/messages.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/execution.h" | 8 #include "src/execution.h" |
| 9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 #include "src/keys.h" | 10 #include "src/keys.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 HandleScope outer_scope(isolate_); | 280 HandleScope outer_scope(isolate_); |
| 281 Handle<Object> result; | 281 Handle<Object> result; |
| 282 for (PrototypeIterator iter(isolate_, obj, kStartAtReceiver); !iter.IsAtEnd(); | 282 for (PrototypeIterator iter(isolate_, obj, kStartAtReceiver); !iter.IsAtEnd(); |
| 283 iter.Advance()) { | 283 iter.Advance()) { |
| 284 Handle<Object> current = PrototypeIterator::GetCurrent(iter); | 284 Handle<Object> current = PrototypeIterator::GetCurrent(iter); |
| 285 if (!current->IsJSObject()) break; | 285 if (!current->IsJSObject()) break; |
| 286 Handle<JSObject> current_obj = Handle<JSObject>::cast(current); | 286 Handle<JSObject> current_obj = Handle<JSObject>::cast(current); |
| 287 if (current_obj->IsAccessCheckNeeded()) break; | 287 if (current_obj->IsAccessCheckNeeded()) break; |
| 288 Handle<FixedArray> keys = | 288 Handle<FixedArray> keys = |
| 289 KeyAccumulator::GetEnumPropertyKeys(isolate_, current_obj); | 289 KeyAccumulator::GetOwnEnumPropertyKeys(isolate_, current_obj); |
| 290 for (int i = 0; i < keys->length(); i++) { | 290 for (int i = 0; i < keys->length(); i++) { |
| 291 HandleScope inner_scope(isolate_); | 291 HandleScope inner_scope(isolate_); |
| 292 if (!keys->get(i)->IsName()) continue; | 292 if (!keys->get(i)->IsName()) continue; |
| 293 Handle<Name> name_key(Name::cast(keys->get(i)), isolate_); | 293 Handle<Name> name_key(Name::cast(keys->get(i)), isolate_); |
| 294 if (!CheckMethodName(isolate_, current_obj, name_key, fun_, | 294 if (!CheckMethodName(isolate_, current_obj, name_key, fun_, |
| 295 LookupIterator::OWN_SKIP_INTERCEPTOR)) | 295 LookupIterator::OWN_SKIP_INTERCEPTOR)) |
| 296 continue; | 296 continue; |
| 297 // Return null in case of duplicates to avoid confusion. | 297 // Return null in case of duplicates to avoid confusion. |
| 298 if (!result.is_null()) return isolate_->factory()->null_value(); | 298 if (!result.is_null()) return isolate_->factory()->null_value(); |
| 299 result = inner_scope.CloseAndEscape(name_key); | 299 result = inner_scope.CloseAndEscape(name_key); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 builder.AppendCharacter(*c); | 439 builder.AppendCharacter(*c); |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 | 442 |
| 443 return builder.Finish(); | 443 return builder.Finish(); |
| 444 } | 444 } |
| 445 | 445 |
| 446 | 446 |
| 447 } // namespace internal | 447 } // namespace internal |
| 448 } // namespace v8 | 448 } // namespace v8 |
| OLD | NEW |