keith_miller@apple.com | 4f35280 | 2016-08-04 21:11:16 +0000 | [diff] [blame] | 1 | function Constructor(x) {} |
2 | |||||
3 | Object.defineProperty(Constructor, Symbol.hasInstance, {value: function() { return false; }}); | ||||
4 | |||||
5 | x = new Constructor(); | ||||
6 | |||||
7 | function body() { | ||||
8 | var result = 0; | ||||
9 | for (var i = 0; i < 100000; i++) { | ||||
10 | if (x instanceof Constructor) | ||||
11 | result++; | ||||
12 | } | ||||
13 | |||||
14 | return result; | ||||
15 | } | ||||
16 | noInline(body); | ||||
17 | |||||
18 | if (body()) | ||||
19 | throw "result incorrect"; |