Index: src/runtime.js |
diff --git a/src/runtime.js b/src/runtime.js |
index a12f6c7b093cb6302b363944d47239c80d4a1055..c3554c63723919a27c9d03dff017b1ab0f4fa71a 100644 |
--- a/src/runtime.js |
+++ b/src/runtime.js |
@@ -375,6 +375,12 @@ function INSTANCE_OF(F) { |
return 1; |
} |
+ // Check if function is bound, if so, get [[BoundFunction]] from it |
+ // and use that instead of F. |
+ var bindings = %BoundFunctionGetBindings(F); |
+ if (bindings) { |
+ F = bindings[kBoundFunctionIndex]; // Always a non-bound function. |
+ } |
// Get the prototype of F; if it is not an object, throw an error. |
var O = F.prototype; |
if (!IS_SPEC_OBJECT(O)) { |