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

Unified Diff: src/elements.cc

Issue 2212963002: [elements] update Dictionary in IncludesValue if own elements change (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index 20e358848a7938c1a13eb7d2126777847dd309e3..25fbc0de9646fcd80210762aaecc2a62f5adb571 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1519,7 +1519,7 @@ class DictionaryElementsAccessor
continue;
}
- PropertyDetails details = GetDetailsImpl(receiver->elements(), entry);
+ PropertyDetails details = GetDetailsImpl(*dictionary, entry);
switch (details.kind()) {
case kData: {
Object* element_k = dictionary->ValueAt(entry);
@@ -1539,9 +1539,10 @@ class DictionaryElementsAccessor
if (value->SameValueZero(*element_k)) return Just(true);
- // Some mutation to the prototype elements may have occurred in
- // accessor.
- if (!JSObject::PrototypeHasNoElements(isolate, *receiver)) {
+ // Some mutation to prototype or own elements may have occurred in the
+ // accessor. If so, bailout to slow path.
+ if (*dictionary != receiver->elements() ||
Camillo Bruni 2016/08/04 15:51:57 as long as we stay in dictionary mode (which is al
caitp 2016/08/04 16:13:06 You're saying the elements kind can't change, so j
caitp 2016/08/04 17:01:58 This seems to be untrue, JSObject::ResetElements()
+ !JSObject::PrototypeHasNoElements(isolate, *receiver)) {
return IncludesValueSlowPath(isolate, receiver, value, k + 1,
length);
}
« no previous file with comments | « no previous file | test/mjsunit/es7/regress/regress-634273.js » ('j') | test/mjsunit/es7/regress/regress-634273.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698