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

Side by Side Diff: src/objects.cc

Issue 1228063004: Fix keyed element access wrt string wrappers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/mips/macro-assembler-mips.cc ('k') | src/x64/macro-assembler-x64.cc » ('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 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 6320 matching lines...) Expand 10 before | Expand all | Expand 10 after
6331 SetElementCallback(object, index, accessors, attributes); 6331 SetElementCallback(object, index, accessors, attributes);
6332 } 6332 }
6333 6333
6334 6334
6335 bool Map::DictionaryElementsInPrototypeChainOnly() { 6335 bool Map::DictionaryElementsInPrototypeChainOnly() {
6336 if (IsDictionaryElementsKind(elements_kind())) { 6336 if (IsDictionaryElementsKind(elements_kind())) {
6337 return false; 6337 return false;
6338 } 6338 }
6339 6339
6340 for (PrototypeIterator iter(this); !iter.IsAtEnd(); iter.Advance()) { 6340 for (PrototypeIterator iter(this); !iter.IsAtEnd(); iter.Advance()) {
6341 if (iter.GetCurrent()->IsJSProxy()) { 6341 // Be conservative, don't walk into proxies.
6342 // Be conservative, don't walk into proxies. 6342 if (iter.GetCurrent()->IsJSProxy()) return true;
6343 return true; 6343 // String wrappers have non-configurable, non-writable elements.
6344 } 6344 if (iter.GetCurrent()->IsStringWrapper()) return true;
6345 6345
6346 if (IsDictionaryElementsKind( 6346 if (IsDictionaryElementsKind(
6347 JSObject::cast(iter.GetCurrent())->map()->elements_kind())) { 6347 JSObject::cast(iter.GetCurrent())->map()->elements_kind())) {
6348 return true; 6348 return true;
6349 } 6349 }
6350 } 6350 }
6351 6351
6352 return false; 6352 return false;
6353 } 6353 }
6354 6354
(...skipping 9765 matching lines...) Expand 10 before | Expand all | Expand 10 after
16120 Handle<Object> new_value) { 16120 Handle<Object> new_value) {
16121 if (cell->value() != *new_value) { 16121 if (cell->value() != *new_value) {
16122 cell->set_value(*new_value); 16122 cell->set_value(*new_value);
16123 Isolate* isolate = cell->GetIsolate(); 16123 Isolate* isolate = cell->GetIsolate();
16124 cell->dependent_code()->DeoptimizeDependentCodeGroup( 16124 cell->dependent_code()->DeoptimizeDependentCodeGroup(
16125 isolate, DependentCode::kPropertyCellChangedGroup); 16125 isolate, DependentCode::kPropertyCellChangedGroup);
16126 } 16126 }
16127 } 16127 }
16128 } // namespace internal 16128 } // namespace internal
16129 } // namespace v8 16129 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698