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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index d16bd828b43bf310e290840e3a5f9ee1175ef422..e66fb4e2a746ce362338ea929d64f68d4bc3a59d 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6338,10 +6338,10 @@ bool Map::DictionaryElementsInPrototypeChainOnly() {
}
for (PrototypeIterator iter(this); !iter.IsAtEnd(); iter.Advance()) {
- if (iter.GetCurrent()->IsJSProxy()) {
- // Be conservative, don't walk into proxies.
- return true;
- }
+ // Be conservative, don't walk into proxies.
+ if (iter.GetCurrent()->IsJSProxy()) return true;
+ // String wrappers have non-configurable, non-writable elements.
+ if (iter.GetCurrent()->IsStringWrapper()) return true;
if (IsDictionaryElementsKind(
JSObject::cast(iter.GetCurrent())->map()->elements_kind())) {
« 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