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

Unified Diff: src/runtime/runtime-array.cc

Issue 1141163004: Bug: Runtime_GrowArrayElements provoked unnecessary lazy deopt. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added test. Created 5 years, 7 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 | « no previous file | test/mjsunit/regress/regress-488398.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-array.cc
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
index d40557474d361071e191b71c5912676ae18fa7fa..e22ea61de92fd5fd743f425eaa027972ed4ec390 100644
--- a/src/runtime/runtime-array.cc
+++ b/src/runtime/runtime-array.cc
@@ -1254,7 +1254,8 @@ RUNTIME_FUNCTION(Runtime_GrowArrayElements) {
if (index >= capacity) {
if (object->WouldConvertToSlowElements(index)) {
- JSObject::NormalizeElements(object);
+ // We don't want to allow operations that cause lazy deopt. Return a Smi
+ // as a signal that optimized code should eagerly deoptimize.
return Smi::FromInt(0);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-488398.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698