diff options
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-crbug-747062.js')
-rw-r--r-- | deps/v8/test/mjsunit/regress/regress-crbug-747062.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-747062.js b/deps/v8/test/mjsunit/regress/regress-crbug-747062.js index 4fe99d39c1..7e0e92ad7e 100644 --- a/deps/v8/test/mjsunit/regress/regress-crbug-747062.js +++ b/deps/v8/test/mjsunit/regress/regress-crbug-747062.js @@ -35,3 +35,19 @@ %OptimizeFunctionOnNextCall(foo); assertInstanceof(foo(), TypeError); })(); + +(function TestNonCallableFilter() { + function foo() { [].filter(undefined); } + assertThrows(foo, TypeError); + assertThrows(foo, TypeError); + %OptimizeFunctionOnNextCall(foo); + assertThrows(foo, TypeError); +})(); + +(function TestNonCallableFilterCaught() { + function foo() { try { [].filter(undefined) } catch(e) { return e } } + assertInstanceof(foo(), TypeError); + assertInstanceof(foo(), TypeError); + %OptimizeFunctionOnNextCall(foo); + assertInstanceof(foo(), TypeError); +})(); |