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

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

Issue 10937026: Fix setting array length to zero for slow elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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/regress/regress-crbug-146910.js
diff --git a/test/mjsunit/regress/regress-110509.js b/test/mjsunit/regress/regress-crbug-146910.js
similarity index 87%
copy from test/mjsunit/regress/regress-110509.js
copy to test/mjsunit/regress/regress-crbug-146910.js
index 132bd233bee32f6c84061049224ea43901dae06a..120f80973192fa9b5ee1db6797da6c13e4358c31 100644
--- a/test/mjsunit/regress/regress-110509.js
+++ b/test/mjsunit/regress/regress-crbug-146910.js
@@ -25,17 +25,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
+var x = [];
+assertSame(0, x.length);
+assertSame(undefined, x[0]);
-// Verify that LRandom preserves rsi correctly.
+Object.defineProperty(x, '0', { value: 7, configurable: false });
+assertSame(1, x.length);
+assertSame(7, x[0]);
-function foo() {
- Math.random();
- new Function("");
-}
-
-foo();
-foo();
-foo();
-%OptimizeFunctionOnNextCall(foo);
-foo();
+x.length = 0;
+assertSame(1, x.length);
+assertSame(7, x[0]);
« 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