| 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));
|
|
|