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 <iomanip> | 5 #include <iomanip> |
6 #include <sstream> | 6 #include <sstream> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 5449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5460 break; | 5460 break; |
5461 } | 5461 } |
5462 case LookupIterator::INTEGER_INDEXED_EXOTIC: | 5462 case LookupIterator::INTEGER_INDEXED_EXOTIC: |
5463 return it.isolate()->factory()->true_value(); | 5463 return it.isolate()->factory()->true_value(); |
5464 case LookupIterator::DATA: | 5464 case LookupIterator::DATA: |
5465 if (is_observed) { | 5465 if (is_observed) { |
5466 old_value = it.GetDataValue(); | 5466 old_value = it.GetDataValue(); |
5467 } | 5467 } |
5468 // Fall through. | 5468 // Fall through. |
5469 case LookupIterator::ACCESSOR: { | 5469 case LookupIterator::ACCESSOR: { |
5470 if (!it.IsConfigurable()) { | 5470 if (!it.IsConfigurable() || object->map()->is_strong()) { |
5471 // Fail if the property is not configurable. | 5471 // Fail if the property is not configurable, or on a strong object. |
5472 if (is_strict(language_mode)) { | 5472 if (is_strict(language_mode)) { |
| 5473 if (object->map()->is_strong()) { |
| 5474 THROW_NEW_ERROR( |
| 5475 it.isolate(), |
| 5476 NewTypeError(MessageTemplate::kStrongDeleteProperty, object, |
| 5477 name), |
| 5478 Object); |
| 5479 } |
5473 THROW_NEW_ERROR(it.isolate(), | 5480 THROW_NEW_ERROR(it.isolate(), |
5474 NewTypeError(MessageTemplate::kStrictDeleteProperty, | 5481 NewTypeError(MessageTemplate::kStrictDeleteProperty, |
5475 name, object), | 5482 name, object), |
5476 Object); | 5483 Object); |
5477 } | 5484 } |
5478 return it.isolate()->factory()->false_value(); | 5485 return it.isolate()->factory()->false_value(); |
5479 } | 5486 } |
5480 | 5487 |
5481 PropertyNormalizationMode mode = object->map()->is_prototype_map() | 5488 PropertyNormalizationMode mode = object->map()->is_prototype_map() |
5482 ? KEEP_INOBJECT_PROPERTIES | 5489 ? KEEP_INOBJECT_PROPERTIES |
(...skipping 11881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17364 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, | 17371 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, |
17365 Handle<Object> new_value) { | 17372 Handle<Object> new_value) { |
17366 if (cell->value() != *new_value) { | 17373 if (cell->value() != *new_value) { |
17367 cell->set_value(*new_value); | 17374 cell->set_value(*new_value); |
17368 Isolate* isolate = cell->GetIsolate(); | 17375 Isolate* isolate = cell->GetIsolate(); |
17369 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17376 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
17370 isolate, DependentCode::kPropertyCellChangedGroup); | 17377 isolate, DependentCode::kPropertyCellChangedGroup); |
17371 } | 17378 } |
17372 } | 17379 } |
17373 } } // namespace v8::internal | 17380 } } // namespace v8::internal |
OLD | NEW |