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

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

Issue 131363008: A64: Synchronize with r15922. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « test/mjsunit/omit-constant-mapcheck.js ('k') | test/mjsunit/regress/regress-crbug-263276.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-258519.js
diff --git a/test/mjsunit/regress/regress-2489.js b/test/mjsunit/regress/regress-crbug-258519.js
similarity index 81%
copy from test/mjsunit/regress/regress-2489.js
copy to test/mjsunit/regress/regress-crbug-258519.js
index 882c4f794a88e24d1d64e86a466b27c39f51e625..b2015a8426f95dbd713afa5999ddd6d585ca7320 100644
--- a/test/mjsunit/regress/regress-2489.js
+++ b/test/mjsunit/regress/regress-crbug-258519.js
@@ -27,24 +27,19 @@
// Flags: --allow-natives-syntax
-"use strict";
-
-function f(a, b) {
- return g("c", "d");
-}
-
-function g(a, b) {
- g.constructor.apply(this, arguments);
+var a = {
+ compare_null: function(x) { return null != x; },
+ kaboom: function() {}
}
-g.constructor = function(a, b) {
- assertEquals("c", a);
- assertEquals("d", b);
+function crash(x) {
+ var b = a;
+ b.compare_null(x) && b.kaboom();
+ return "ok";
}
-f("a", "b");
-f("a", "b");
-%OptimizeFunctionOnNextCall(f);
-f("a", "b");
-g.x = "deopt";
-f("a", "b");
+assertEquals("ok", crash(null));
+assertEquals("ok", crash(null));
+%OptimizeFunctionOnNextCall(crash);
+// Used to throw: "TypeError: Cannot call method 'kaboom' of undefined".
+assertEquals("ok", crash(1));
« no previous file with comments | « test/mjsunit/omit-constant-mapcheck.js ('k') | test/mjsunit/regress/regress-crbug-263276.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698