Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index 883219d47037d800acff6a80089933324fc9b49a..ba7eb083eb9762967d8179068b650b24fe866447 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -1120,7 +1120,8 @@ Reduction JSTypedLowering::ReduceJSInstanceOf(Node* node) { |
Handle<JSFunction> function = |
Handle<JSFunction>::cast(r.right_type()->AsConstant()->Value()); |
Handle<SharedFunctionInfo> shared(function->shared(), isolate()); |
- if (!function->map()->has_non_instance_prototype()) { |
+ if (function->IsConstructor() && |
+ !function->map()->has_non_instance_prototype()) { |
JSFunction::EnsureHasInitialMap(function); |
DCHECK(function->has_initial_map()); |
Handle<Map> initial_map(function->initial_map(), isolate()); |