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

Unified Diff: test/mjsunit/regress/regress-crbug-618788.js

Issue 2058013002: Array.prototype.slice should only normalize result if it's an array (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« src/js/array.js ('K') | « src/js/array.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-618788.js
diff --git a/test/intl/regexp-prepare.js b/test/mjsunit/regress/regress-crbug-618788.js
similarity index 51%
copy from test/intl/regexp-prepare.js
copy to test/mjsunit/regress/regress-crbug-618788.js
index dec84110ed02e30bba674538534a069f7d43d39d..6e49ec2f503762b7fc5f969caf46edb510f970d8 100644
--- a/test/intl/regexp-prepare.js
+++ b/test/mjsunit/regress/regress-crbug-618788.js
@@ -2,4 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-/(\w)(\w)(\w)(\w)(\w)(\w)(\w)(\w)(\w)(\w)/.exec(">>>abcdefghij<<<");
+var a = new Array();
+a.constructor = Int32Array;
+a.length = 1000; // Make the length >= 1000 so UseSparseVariant returns true.
+assertThrows(() => a.slice());
Camillo Bruni 2016/06/10 14:04:25 Can you convince me that we have to throw here? No
adamk 2016/06/10 16:33:17 Oh, this is throwing for perfectly "good" reasons
Camillo Bruni 2016/06/12 12:35:45 humm, the above code works in FF though (yes my ul
adamk 2016/06/13 12:16:21 From offline discussion: I don't know why Firefox
« src/js/array.js ('K') | « src/js/array.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698