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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 } | 276 } |
277 } | 277 } |
278 if (CheckMethodName(isolate_, obj, name, fun_, | 278 if (CheckMethodName(isolate_, obj, name, fun_, |
279 LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR)) { | 279 LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR)) { |
280 return name; | 280 return name; |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 HandleScope outer_scope(isolate_); | 284 HandleScope outer_scope(isolate_); |
285 Handle<Object> result; | 285 Handle<Object> result; |
286 for (PrototypeIterator iter(isolate_, obj, | 286 for (PrototypeIterator iter(isolate_, obj, kStartAtReceiver); !iter.IsAtEnd(); |
287 PrototypeIterator::START_AT_RECEIVER); | 287 iter.Advance()) { |
288 !iter.IsAtEnd(); iter.Advance()) { | |
289 Handle<Object> current = PrototypeIterator::GetCurrent(iter); | 288 Handle<Object> current = PrototypeIterator::GetCurrent(iter); |
290 if (!current->IsJSObject()) break; | 289 if (!current->IsJSObject()) break; |
291 Handle<JSObject> current_obj = Handle<JSObject>::cast(current); | 290 Handle<JSObject> current_obj = Handle<JSObject>::cast(current); |
292 if (current_obj->IsAccessCheckNeeded()) break; | 291 if (current_obj->IsAccessCheckNeeded()) break; |
293 Handle<FixedArray> keys = | 292 Handle<FixedArray> keys = |
294 KeyAccumulator::GetEnumPropertyKeys(isolate_, current_obj); | 293 KeyAccumulator::GetEnumPropertyKeys(isolate_, current_obj); |
295 for (int i = 0; i < keys->length(); i++) { | 294 for (int i = 0; i < keys->length(); i++) { |
296 HandleScope inner_scope(isolate_); | 295 HandleScope inner_scope(isolate_); |
297 if (!keys->get(i)->IsName()) continue; | 296 if (!keys->get(i)->IsName()) continue; |
298 Handle<Name> name_key(Name::cast(keys->get(i)), isolate_); | 297 Handle<Name> name_key(Name::cast(keys->get(i)), isolate_); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 builder.AppendCharacter(*c); | 443 builder.AppendCharacter(*c); |
445 } | 444 } |
446 } | 445 } |
447 | 446 |
448 return builder.Finish(); | 447 return builder.Finish(); |
449 } | 448 } |
450 | 449 |
451 | 450 |
452 } // namespace internal | 451 } // namespace internal |
453 } // namespace v8 | 452 } // namespace v8 |
OLD | NEW |