OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/string-stream.h" | 5 #include "src/string-stream.h" |
6 | 6 |
7 #include "src/handles-inl.h" | 7 #include "src/handles-inl.h" |
8 #include "src/prototype.h" | 8 #include "src/prototype.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 if (receiver->IsNull() || receiver->IsUndefined() || receiver->IsJSProxy()) { | 530 if (receiver->IsNull() || receiver->IsUndefined() || receiver->IsJSProxy()) { |
531 print_name = true; | 531 print_name = true; |
532 } else { | 532 } else { |
533 if (!receiver->IsJSObject()) { | 533 if (!receiver->IsJSObject()) { |
534 receiver = receiver->GetRootMap(isolate)->prototype(); | 534 receiver = receiver->GetRootMap(isolate)->prototype(); |
535 } | 535 } |
536 | 536 |
537 for (PrototypeIterator iter(isolate, JSObject::cast(receiver), | 537 for (PrototypeIterator iter(isolate, JSObject::cast(receiver), |
538 PrototypeIterator::START_AT_RECEIVER); | 538 PrototypeIterator::START_AT_RECEIVER); |
539 !iter.IsAtEnd(); iter.Advance()) { | 539 !iter.IsAtEnd(); iter.Advance()) { |
| 540 if (iter.GetCurrent()->IsJSProxy()) break; |
540 Object* key = iter.GetCurrent<JSObject>()->SlowReverseLookup(fun); | 541 Object* key = iter.GetCurrent<JSObject>()->SlowReverseLookup(fun); |
541 if (!key->IsUndefined()) { | 542 if (!key->IsUndefined()) { |
542 if (!name->IsString() || | 543 if (!name->IsString() || |
543 !key->IsString() || | 544 !key->IsString() || |
544 !String::cast(name)->Equals(String::cast(key))) { | 545 !String::cast(name)->Equals(String::cast(key))) { |
545 print_name = true; | 546 print_name = true; |
546 } | 547 } |
547 if (name->IsString() && String::cast(name)->length() == 0) { | 548 if (name->IsString() && String::cast(name)->length() == 0) { |
548 print_name = false; | 549 print_name = false; |
549 } | 550 } |
(...skipping 26 matching lines...) Expand all Loading... |
576 MemCopy(new_space, space_, *bytes); | 577 MemCopy(new_space, space_, *bytes); |
577 *bytes = new_bytes; | 578 *bytes = new_bytes; |
578 DeleteArray(space_); | 579 DeleteArray(space_); |
579 space_ = new_space; | 580 space_ = new_space; |
580 return new_space; | 581 return new_space; |
581 } | 582 } |
582 | 583 |
583 | 584 |
584 } // namespace internal | 585 } // namespace internal |
585 } // namespace v8 | 586 } // namespace v8 |
OLD | NEW |