Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/objects.cc

Issue 1651253003: More *_STRING_WRAPPER_ELEMENTS fixes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ...and one more fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/elements.cc ('k') | test/mjsunit/regress/regress-crbug-583257.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7890 matching lines...) Expand 10 before | Expand all | Expand 10 after
7901 DCHECK(attrs == FROZEN); 7901 DCHECK(attrs == FROZEN);
7902 transition_marker = isolate->factory()->frozen_symbol(); 7902 transition_marker = isolate->factory()->frozen_symbol();
7903 } 7903 }
7904 7904
7905 Handle<Map> old_map(object->map(), isolate); 7905 Handle<Map> old_map(object->map(), isolate);
7906 Map* transition = 7906 Map* transition =
7907 TransitionArray::SearchSpecial(*old_map, *transition_marker); 7907 TransitionArray::SearchSpecial(*old_map, *transition_marker);
7908 if (transition != NULL) { 7908 if (transition != NULL) {
7909 Handle<Map> transition_map(transition, isolate); 7909 Handle<Map> transition_map(transition, isolate);
7910 DCHECK(transition_map->has_dictionary_elements() || 7910 DCHECK(transition_map->has_dictionary_elements() ||
7911 transition_map->has_fixed_typed_array_elements()); 7911 transition_map->has_fixed_typed_array_elements() ||
7912 transition_map->elements_kind() == SLOW_STRING_WRAPPER_ELEMENTS);
7912 DCHECK(!transition_map->is_extensible()); 7913 DCHECK(!transition_map->is_extensible());
7913 JSObject::MigrateToMap(object, transition_map); 7914 JSObject::MigrateToMap(object, transition_map);
7914 } else if (TransitionArray::CanHaveMoreTransitions(old_map)) { 7915 } else if (TransitionArray::CanHaveMoreTransitions(old_map)) {
7915 // Create a new descriptor array with the appropriate property attributes 7916 // Create a new descriptor array with the appropriate property attributes
7916 Handle<Map> new_map = Map::CopyForPreventExtensions( 7917 Handle<Map> new_map = Map::CopyForPreventExtensions(
7917 old_map, attrs, transition_marker, "CopyForPreventExtensions"); 7918 old_map, attrs, transition_marker, "CopyForPreventExtensions");
7918 JSObject::MigrateToMap(object, new_map); 7919 JSObject::MigrateToMap(object, new_map);
7919 } else { 7920 } else {
7920 DCHECK(old_map->is_dictionary_map() || !old_map->is_prototype_map()); 7921 DCHECK(old_map->is_dictionary_map() || !old_map->is_prototype_map());
7921 // Slow path: need to normalize properties for safety 7922 // Slow path: need to normalize properties for safety
(...skipping 11847 matching lines...) Expand 10 before | Expand all | Expand 10 after
19769 if (cell->value() != *new_value) { 19770 if (cell->value() != *new_value) {
19770 cell->set_value(*new_value); 19771 cell->set_value(*new_value);
19771 Isolate* isolate = cell->GetIsolate(); 19772 Isolate* isolate = cell->GetIsolate();
19772 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19773 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19773 isolate, DependentCode::kPropertyCellChangedGroup); 19774 isolate, DependentCode::kPropertyCellChangedGroup);
19774 } 19775 }
19775 } 19776 }
19776 19777
19777 } // namespace internal 19778 } // namespace internal
19778 } // namespace v8 19779 } // namespace v8
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | test/mjsunit/regress/regress-crbug-583257.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698