| 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/string-builder.h" | 10 #include "src/string-builder.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 HandleScope outer_scope(isolate_); | 244 HandleScope outer_scope(isolate_); |
| 245 Handle<Object> result; | 245 Handle<Object> result; |
| 246 for (PrototypeIterator iter(isolate_, obj, | 246 for (PrototypeIterator iter(isolate_, obj, |
| 247 PrototypeIterator::START_AT_RECEIVER); | 247 PrototypeIterator::START_AT_RECEIVER); |
| 248 !iter.IsAtEnd(); iter.Advance()) { | 248 !iter.IsAtEnd(); iter.Advance()) { |
| 249 Handle<Object> current = PrototypeIterator::GetCurrent(iter); | 249 Handle<Object> current = PrototypeIterator::GetCurrent(iter); |
| 250 if (!current->IsJSObject()) break; | 250 if (!current->IsJSObject()) break; |
| 251 Handle<JSObject> current_obj = Handle<JSObject>::cast(current); | 251 Handle<JSObject> current_obj = Handle<JSObject>::cast(current); |
| 252 if (current_obj->IsAccessCheckNeeded()) break; | 252 if (current_obj->IsAccessCheckNeeded()) break; |
| 253 Handle<FixedArray> keys = | 253 Handle<FixedArray> keys = JSObject::GetEnumPropertyKeys(current_obj, false); |
| 254 JSObject::GetOwnEnumPropertyKeys(current_obj, false); | |
| 255 for (int i = 0; i < keys->length(); i++) { | 254 for (int i = 0; i < keys->length(); i++) { |
| 256 HandleScope inner_scope(isolate_); | 255 HandleScope inner_scope(isolate_); |
| 257 if (!keys->get(i)->IsName()) continue; | 256 if (!keys->get(i)->IsName()) continue; |
| 258 Handle<Name> name_key(Name::cast(keys->get(i)), isolate_); | 257 Handle<Name> name_key(Name::cast(keys->get(i)), isolate_); |
| 259 if (!CheckMethodName(isolate_, current_obj, name_key, fun_, | 258 if (!CheckMethodName(isolate_, current_obj, name_key, fun_, |
| 260 LookupIterator::OWN_SKIP_INTERCEPTOR)) | 259 LookupIterator::OWN_SKIP_INTERCEPTOR)) |
| 261 continue; | 260 continue; |
| 262 // Return null in case of duplicates to avoid confusion. | 261 // Return null in case of duplicates to avoid confusion. |
| 263 if (!result.is_null()) return isolate_->factory()->null_value(); | 262 if (!result.is_null()) return isolate_->factory()->null_value(); |
| 264 result = inner_scope.CloseAndEscape(name_key); | 263 result = inner_scope.CloseAndEscape(name_key); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 builder.AppendCharacter(*c); | 400 builder.AppendCharacter(*c); |
| 402 } | 401 } |
| 403 } | 402 } |
| 404 | 403 |
| 405 return builder.Finish(); | 404 return builder.Finish(); |
| 406 } | 405 } |
| 407 | 406 |
| 408 | 407 |
| 409 } // namespace internal | 408 } // namespace internal |
| 410 } // namespace v8 | 409 } // namespace v8 |
| OLD | NEW |