| 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 3280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3291 if (!value->IsNumber() && !value->IsUndefined()) { | 3291 if (!value->IsNumber() && !value->IsUndefined()) { |
| 3292 ASSIGN_RETURN_ON_EXCEPTION(it->isolate(), to_assign, | 3292 ASSIGN_RETURN_ON_EXCEPTION(it->isolate(), to_assign, |
| 3293 Execution::ToNumber(it->isolate(), value), | 3293 Execution::ToNumber(it->isolate(), value), |
| 3294 Object); | 3294 Object); |
| 3295 // ToNumber above might modify the receiver, causing the cached | 3295 // ToNumber above might modify the receiver, causing the cached |
| 3296 // holder_map to mismatch the actual holder->map() after this point. | 3296 // holder_map to mismatch the actual holder->map() after this point. |
| 3297 // Reload the map to be in consistent state. Other cached state cannot | 3297 // Reload the map to be in consistent state. Other cached state cannot |
| 3298 // have been invalidated since typed array elements cannot be reconfigured | 3298 // have been invalidated since typed array elements cannot be reconfigured |
| 3299 // in any way. | 3299 // in any way. |
| 3300 it->ReloadHolderMap(); | 3300 it->ReloadHolderMap(); |
| 3301 |
| 3302 // We have to recheck the length. However, it can only change if the |
| 3303 // underlying buffer was neutered, so just check that. |
| 3304 if (Handle<JSArrayBufferView>::cast(receiver)->WasNeutered()) { |
| 3305 return value; |
| 3306 } |
| 3301 } | 3307 } |
| 3302 } | 3308 } |
| 3303 | 3309 |
| 3304 // Possibly migrate to the most up-to-date map that will be able to store | 3310 // Possibly migrate to the most up-to-date map that will be able to store |
| 3305 // |value| under it->name(). | 3311 // |value| under it->name(). |
| 3306 it->PrepareForDataProperty(to_assign); | 3312 it->PrepareForDataProperty(to_assign); |
| 3307 | 3313 |
| 3308 // Write the property value. | 3314 // Write the property value. |
| 3309 it->WriteDataValue(to_assign); | 3315 it->WriteDataValue(to_assign); |
| 3310 | 3316 |
| (...skipping 12822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16133 Handle<Object> new_value) { | 16139 Handle<Object> new_value) { |
| 16134 if (cell->value() != *new_value) { | 16140 if (cell->value() != *new_value) { |
| 16135 cell->set_value(*new_value); | 16141 cell->set_value(*new_value); |
| 16136 Isolate* isolate = cell->GetIsolate(); | 16142 Isolate* isolate = cell->GetIsolate(); |
| 16137 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16143 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 16138 isolate, DependentCode::kPropertyCellChangedGroup); | 16144 isolate, DependentCode::kPropertyCellChangedGroup); |
| 16139 } | 16145 } |
| 16140 } | 16146 } |
| 16141 } // namespace internal | 16147 } // namespace internal |
| 16142 } // namespace v8 | 16148 } // namespace v8 |
| OLD | NEW |