| Index: src/runtime/runtime-object.cc
|
| diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
|
| index 4c11b15526376e32e2ae3989c36649d070b31745..11f999224fdc4c61bc2c9fe2ff7eab4b45c4ca4e 100644
|
| --- a/src/runtime/runtime-object.cc
|
| +++ b/src/runtime/runtime-object.cc
|
| @@ -1346,14 +1346,12 @@ RUNTIME_FUNCTION(Runtime_InstanceOf) {
|
| if (!object->IsJSReceiver()) {
|
| return isolate->heap()->false_value();
|
| }
|
| - // Check if {callable} is bound, if so, get [[BoundFunction]] from it and use
|
| - // that instead of {callable}.
|
| - if (callable->IsJSFunction()) {
|
| - Handle<JSFunction> function = Handle<JSFunction>::cast(callable);
|
| - if (function->shared()->bound()) {
|
| - Handle<BindingsArray> bindings(function->function_bindings(), isolate);
|
| - callable = handle(bindings->bound_function(), isolate);
|
| - }
|
| + // Check if {callable} is bound, if so, get [[BoundTargetFunction]] from it
|
| + // and use that instead of {callable}.
|
| + while (callable->IsJSBoundFunction()) {
|
| + callable =
|
| + handle(Handle<JSBoundFunction>::cast(callable)->bound_target_function(),
|
| + isolate);
|
| }
|
| DCHECK(callable->IsCallable());
|
| // Get the "prototype" of {callable}; raise an error if it's not a receiver.
|
|
|