commit-queue@webkit.org | a4201b0 | 2015-08-17 22:24:20 +0000 | [diff] [blame] | 1 | var A = class A { }; |
| 2 | var B = class B extends A { |
| 3 | constructor(accessThisBeforeSuper) { |
| 4 | if (accessThisBeforeSuper) { |
| 5 | var f = () => this; |
| 6 | super(); |
| 7 | } else { |
| 8 | super(); |
| 9 | } |
| 10 | } |
| 11 | }; |
| 12 | |
| 13 | var exception = null; |
| 14 | for (var i=0; i<10000; i++) { |
| 15 | try { |
| 16 | new B(true); |
| 17 | } catch (e) { |
| 18 | exception = e; |
| 19 | if (!(e instanceof ReferenceError)) |
| 20 | throw "Exception thrown was not a reference error"; |
| 21 | } |
| 22 | |
| 23 | if (!exception) |
| 24 | throw "Exception not thrown for an unitialized this at iteration"; |
| 25 | |
| 26 | var e = new B(false); |
| 27 | } |