OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 Object* last = result->IsProperty() | 620 Object* last = result->IsProperty() |
621 ? result->holder() | 621 ? result->holder() |
622 : Object::cast(heap->null_value()); | 622 : Object::cast(heap->null_value()); |
623 ASSERT(this != this->GetPrototype()); | 623 ASSERT(this != this->GetPrototype()); |
624 for (Object* current = this; true; current = current->GetPrototype()) { | 624 for (Object* current = this; true; current = current->GetPrototype()) { |
625 if (current->IsAccessCheckNeeded()) { | 625 if (current->IsAccessCheckNeeded()) { |
626 // Check if we're allowed to read from the current object. Note | 626 // Check if we're allowed to read from the current object. Note |
627 // that even though we may not actually end up loading the named | 627 // that even though we may not actually end up loading the named |
628 // property from the current object, we still check that we have | 628 // property from the current object, we still check that we have |
629 // access to it. | 629 // access to it. |
| 630 // TODO(dcarney): revert. |
| 631 CHECK(current->IsJSObject()); |
630 JSObject* checked = JSObject::cast(current); | 632 JSObject* checked = JSObject::cast(current); |
631 if (!heap->isolate()->MayNamedAccess(checked, name, v8::ACCESS_GET)) { | 633 if (!heap->isolate()->MayNamedAccess(checked, name, v8::ACCESS_GET)) { |
632 return checked->GetPropertyWithFailedAccessCheck(receiver, | 634 return checked->GetPropertyWithFailedAccessCheck(receiver, |
633 result, | 635 result, |
634 name, | 636 name, |
635 attributes); | 637 attributes); |
636 } | 638 } |
637 } | 639 } |
638 // Stop traversing the chain once we reach the last object in the | 640 // Stop traversing the chain once we reach the last object in the |
639 // chain; either the holder of the result or null in case of an | 641 // chain; either the holder of the result or null in case of an |
(...skipping 13139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13779 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13781 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13780 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13782 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13781 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13783 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13782 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13784 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13783 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13785 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13784 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13786 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13785 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13787 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13786 } | 13788 } |
13787 | 13789 |
13788 } } // namespace v8::internal | 13790 } } // namespace v8::internal |
OLD | NEW |