OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
987 if (it->state() == LookupIterator::ACCESSOR) { | 987 if (it->state() == LookupIterator::ACCESSOR) { |
988 return GetPropertyWithAccessor(it, SLOPPY); | 988 return GetPropertyWithAccessor(it, SLOPPY); |
989 } | 989 } |
990 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state()); | 990 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state()); |
991 bool done; | 991 bool done; |
992 Handle<Object> result; | 992 Handle<Object> result; |
993 ASSIGN_RETURN_ON_EXCEPTION(it->isolate(), result, | 993 ASSIGN_RETURN_ON_EXCEPTION(it->isolate(), result, |
994 GetPropertyWithInterceptor(it, &done), Object); | 994 GetPropertyWithInterceptor(it, &done), Object); |
995 if (done) return result; | 995 if (done) return result; |
996 } | 996 } |
997 if (!it->IsElement()) { | |
Toon Verwaest
2015/10/02 08:05:27
Rather than if (!it->IsElement()) etc, you can jus
caitp (gmail)
2015/10/02 10:01:15
GetName() converts elements to strings, which isn'
Toon Verwaest
2015/10/02 10:07:01
That is possibly true. It could already have been
caitp (gmail)
2015/10/02 10:41:56
Done.
| |
998 Handle<Name> name = it->name(); | |
999 if (name->IsSymbol() && | |
1000 Handle<Symbol>::cast(name)->is_well_known_symbol()) { | |
1001 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); | |
Toon Verwaest
2015/10/02 08:05:27
I don't see why this statement (RETURN_EX..) is ne
caitp (gmail)
2015/10/02 10:01:15
I guess it isn't really needed, will remove
caitp (gmail)
2015/10/02 10:41:56
Done.
| |
1002 return it->factory()->undefined_value(); | |
1003 } | |
1004 } | |
997 it->isolate()->ReportFailedAccessCheck(checked); | 1005 it->isolate()->ReportFailedAccessCheck(checked); |
998 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); | 1006 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); |
999 return it->factory()->undefined_value(); | 1007 return it->factory()->undefined_value(); |
1000 } | 1008 } |
1001 | 1009 |
1002 | 1010 |
1003 Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithFailedAccessCheck( | 1011 Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithFailedAccessCheck( |
1004 LookupIterator* it) { | 1012 LookupIterator* it) { |
1005 Handle<JSObject> checked = it->GetHolder<JSObject>(); | 1013 Handle<JSObject> checked = it->GetHolder<JSObject>(); |
1006 while (AllCanRead(it)) { | 1014 while (AllCanRead(it)) { |
(...skipping 15807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
16814 if (cell->value() != *new_value) { | 16822 if (cell->value() != *new_value) { |
16815 cell->set_value(*new_value); | 16823 cell->set_value(*new_value); |
16816 Isolate* isolate = cell->GetIsolate(); | 16824 Isolate* isolate = cell->GetIsolate(); |
16817 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16825 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
16818 isolate, DependentCode::kPropertyCellChangedGroup); | 16826 isolate, DependentCode::kPropertyCellChangedGroup); |
16819 } | 16827 } |
16820 } | 16828 } |
16821 | 16829 |
16822 } // namespace internal | 16830 } // namespace internal |
16823 } // namespace v8 | 16831 } // namespace v8 |
OLD | NEW |