BackwardsGraph needs to consider back edges as the backward's root successor
[WebKit-https.git] / JSTests / es6 / prototype_of_bound_functions_basic_functions.js
1 function test() {
2
3 function correctProtoBound(proto) {
4   var f = function(){};
5   if (Object.setPrototypeOf) {
6     Object.setPrototypeOf(f, proto);
7   }
8   else {
9     f.__proto__ = proto;
10   } 
11   var boundF = Function.prototype.bind.call(f, null);
12   return Object.getPrototypeOf(boundF) === proto;
13 }
14 return correctProtoBound(Function.prototype)
15   && correctProtoBound({})
16   && correctProtoBound(null);
17       
18 }
19
20 if (!test())
21     throw new Error("Test failed");
22