blob: 12f24230c34414628be5ee2953f84af324107f8f [file] [log] [blame]
keith_miller@apple.comcb11fe42015-12-18 00:37:35 +00001function Constructor(x) {}
2
3Object.defineProperty(Constructor, Symbol.hasInstance, {value: function() { return false; }});
4
5x = new Constructor();
6
7function instanceOf(a, b) {
8 return a instanceof b;
9}
10noInline(instanceOf);
11
12function body() {
13 var result = 0;
14 for (var i = 0; i < 100000; i++) {
15 if (instanceOf(x, Constructor))
16 result++;
17 }
18
19 return result;
20}
21noInline(body);
22
23if (body())
24 throw "result incorrect";