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 3748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3759 should_throw); | 3759 should_throw); |
3760 } | 3760 } |
3761 break; | 3761 break; |
3762 | 3762 |
3763 case LookupIterator::INTEGER_INDEXED_EXOTIC: | 3763 case LookupIterator::INTEGER_INDEXED_EXOTIC: |
3764 return RedefineIncompatibleProperty(it->isolate(), it->GetName(), value, | 3764 return RedefineIncompatibleProperty(it->isolate(), it->GetName(), value, |
3765 should_throw); | 3765 should_throw); |
3766 | 3766 |
3767 case LookupIterator::DATA: { | 3767 case LookupIterator::DATA: { |
3768 PropertyDetails details = own_lookup.property_details(); | 3768 PropertyDetails details = own_lookup.property_details(); |
3769 if (details.IsConfigurable() || !details.IsReadOnly()) { | 3769 if (details.IsReadOnly()) { |
3770 return JSObject::DefineOwnPropertyIgnoreAttributes( | 3770 return WriteToReadOnlyProperty(&own_lookup, value, should_throw); |
3771 &own_lookup, value, details.attributes(), should_throw); | |
3772 } | 3771 } |
3773 return WriteToReadOnlyProperty(&own_lookup, value, should_throw); | 3772 return JSObject::DefineOwnPropertyIgnoreAttributes( |
3773 &own_lookup, value, details.attributes(), should_throw); | |
Toon Verwaest
2015/11/03 12:06:52
Won't this just SetDataProperty(it, value, THROW_O
neis
2015/11/03 12:56:07
Not THROW_ON_ERROR, but yeah, looks like this will
| |
3774 } | 3774 } |
3775 | 3775 |
3776 case LookupIterator::ACCESSOR: { | 3776 case LookupIterator::ACCESSOR: { |
3777 return RedefineIncompatibleProperty(it->isolate(), it->GetName(), value, | 3777 return RedefineIncompatibleProperty(it->isolate(), it->GetName(), value, |
3778 should_throw); | 3778 should_throw); |
3779 } | 3779 } |
3780 | 3780 |
3781 case LookupIterator::INTERCEPTOR: | 3781 case LookupIterator::INTERCEPTOR: |
3782 case LookupIterator::JSPROXY: { | 3782 case LookupIterator::JSPROXY: { |
3783 bool found = false; | 3783 bool found = false; |
(...skipping 14225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
18009 if (cell->value() != *new_value) { | 18009 if (cell->value() != *new_value) { |
18010 cell->set_value(*new_value); | 18010 cell->set_value(*new_value); |
18011 Isolate* isolate = cell->GetIsolate(); | 18011 Isolate* isolate = cell->GetIsolate(); |
18012 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18012 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
18013 isolate, DependentCode::kPropertyCellChangedGroup); | 18013 isolate, DependentCode::kPropertyCellChangedGroup); |
18014 } | 18014 } |
18015 } | 18015 } |
18016 | 18016 |
18017 } // namespace internal | 18017 } // namespace internal |
18018 } // namespace v8 | 18018 } // namespace v8 |
OLD | NEW |