OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4276 | 4276 |
4277 for (; own_lookup.IsFound(); own_lookup.Next()) { | 4277 for (; own_lookup.IsFound(); own_lookup.Next()) { |
4278 switch (own_lookup.state()) { | 4278 switch (own_lookup.state()) { |
4279 case LookupIterator::ACCESS_CHECK: | 4279 case LookupIterator::ACCESS_CHECK: |
4280 if (!own_lookup.HasAccess()) { | 4280 if (!own_lookup.HasAccess()) { |
4281 return JSObject::SetPropertyWithFailedAccessCheck(&own_lookup, value, | 4281 return JSObject::SetPropertyWithFailedAccessCheck(&own_lookup, value, |
4282 should_throw); | 4282 should_throw); |
4283 } | 4283 } |
4284 break; | 4284 break; |
4285 | 4285 |
| 4286 case LookupIterator::ACCESSOR: |
| 4287 if (own_lookup.GetAccessors()->IsAccessorInfo()) { |
| 4288 if (own_lookup.IsReadOnly()) { |
| 4289 return WriteToReadOnlyProperty(&own_lookup, value, should_throw); |
| 4290 } |
| 4291 return JSObject::SetPropertyWithAccessor(&own_lookup, value, |
| 4292 should_throw); |
| 4293 } |
| 4294 // Fall through. |
4286 case LookupIterator::INTEGER_INDEXED_EXOTIC: | 4295 case LookupIterator::INTEGER_INDEXED_EXOTIC: |
4287 case LookupIterator::ACCESSOR: | |
4288 return RedefineIncompatibleProperty(isolate, it->GetName(), value, | 4296 return RedefineIncompatibleProperty(isolate, it->GetName(), value, |
4289 should_throw); | 4297 should_throw); |
4290 | 4298 |
4291 case LookupIterator::DATA: { | 4299 case LookupIterator::DATA: { |
4292 if (own_lookup.IsReadOnly()) { | 4300 if (own_lookup.IsReadOnly()) { |
4293 return WriteToReadOnlyProperty(&own_lookup, value, should_throw); | 4301 return WriteToReadOnlyProperty(&own_lookup, value, should_throw); |
4294 } | 4302 } |
4295 return SetDataProperty(&own_lookup, value); | 4303 return SetDataProperty(&own_lookup, value); |
4296 } | 4304 } |
4297 | 4305 |
(...skipping 15577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19875 if (cell->value() != *new_value) { | 19883 if (cell->value() != *new_value) { |
19876 cell->set_value(*new_value); | 19884 cell->set_value(*new_value); |
19877 Isolate* isolate = cell->GetIsolate(); | 19885 Isolate* isolate = cell->GetIsolate(); |
19878 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19886 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19879 isolate, DependentCode::kPropertyCellChangedGroup); | 19887 isolate, DependentCode::kPropertyCellChangedGroup); |
19880 } | 19888 } |
19881 } | 19889 } |
19882 | 19890 |
19883 } // namespace internal | 19891 } // namespace internal |
19884 } // namespace v8 | 19892 } // namespace v8 |
OLD | NEW |