| Index: test/mjsunit/regress/regress-6121.js
|
| diff --git a/test/mjsunit/regress/regress-6121.js b/test/mjsunit/regress/regress-6121.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c29ba2b067e86234cf90933dd8e4b9f31a98b68f
|
| --- /dev/null
|
| +++ b/test/mjsunit/regress/regress-6121.js
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2017 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Flags: --allow-natives-syntax
|
| +
|
| +function foo(o) {
|
| + try {
|
| + for (var x in o) {}
|
| + return false;
|
| + } catch (e) {
|
| + return true;
|
| + }
|
| +}
|
| +
|
| +var o = new Proxy({a:1},{
|
| + getOwnPropertyDescriptor(target, property) { throw target; }
|
| +});
|
| +
|
| +assertTrue(foo(o));
|
| +assertTrue(foo(o));
|
| +%OptimizeFunctionOnNextCall(foo);
|
| +assertTrue(foo(o));
|
|
|