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

Unified Diff: test/mjsunit/element-accessor.js

Issue 2297253002: [elements] Fix GetEntryForIndexImpl to honor array length (Closed)
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
« no previous file with comments | « src/elements.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/element-accessor.js
diff --git a/test/mjsunit/element-accessor.js b/test/mjsunit/element-accessor.js
index 452afc8d168783038edf27e3f255e95884cbd316..5fba359c2a769cd5b46598bacc385c519ffa7762 100644
--- a/test/mjsunit/element-accessor.js
+++ b/test/mjsunit/element-accessor.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
(function () {
var o = [];
o.__proto__ = {};
@@ -31,3 +33,18 @@
Object.defineProperty(o, "0", {get: function(){}});
assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0"));
})();
+
+(function() {
+ function f() {
+ var a = new Array();
+ a[1] = 1.5;
+ return a;
+ }
+
+ f();
+ f();
+ %OptimizeFunctionOnNextCall(f);
+ var a = f();
+ a[2] = 2;
+ assertEquals(3, a.length);
+})();
« no previous file with comments | « src/elements.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698