Reviewers: machenbach,
Message:
Michael: PTAL.
Danno: FYI. You can include this test when you backport the fix to the 3.19
branch.
Description:
Add regression test for recently fixed bug
BUG=chromium:258519
Please review this at https://codereview.chromium.org/20732002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
A + test/mjsunit/regress/regress-crbug-258519.js
Index: test/mjsunit/regress/regress-crbug-258519.js
diff --git a/test/mjsunit/regress/regress-crbug-242870.js
b/test/mjsunit/regress/regress-crbug-258519.js
similarity index 81%
copy from test/mjsunit/regress/regress-crbug-242870.js
copy to test/mjsunit/regress/regress-crbug-258519.js
index
7183375ca811cedc81c870d34e694e98cf727f9b..b2015a8426f95dbd713afa5999ddd6d585ca7320
100644
--- a/test/mjsunit/regress/regress-crbug-242870.js
+++ b/test/mjsunit/regress/regress-crbug-258519.js
@@ -27,17 +27,19 @@
// Flags: --allow-natives-syntax
-var non_const_true = true;
-
-function f() {
- return (non_const_true || true && g());
+var a = {
+ compare_null: function(x) { return null != x; },
+ kaboom: function() {}
}
-function g() {
- for (;;) {}
+function crash(x) {
+ var b = a;
+ b.compare_null(x) && b.kaboom();
+ return "ok";
}
-assertTrue(f());
-assertTrue(f());
-%OptimizeFunctionOnNextCall(f);
-assertTrue(f());
+assertEquals("ok", crash(null));
+assertEquals("ok", crash(null));
+%OptimizeFunctionOnNextCall(crash);
+// Used to throw: "TypeError: Cannot call method 'kaboom' of undefined".
+assertEquals("ok", crash(1));
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.