Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index 0910ae83f5368d18b6931256e57c8c9caa9ff12f..e7ece5df09cd5014c3f249e6d961c73801b1dae6 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -937,7 +937,8 @@ Handle<Code> LoadIC::CompileHandler(LookupResult* lookup, Handle<Object> object, |
// Use specialized code for getting prototype of functions. |
if (object->IsJSFunction() && |
String::Equals(isolate()->factory()->prototype_string(), name) && |
- Handle<JSFunction>::cast(object)->should_have_prototype()) { |
+ Handle<JSFunction>::cast(object)->should_have_prototype() && |
+ !Handle<JSFunction>::cast(object)->map()->has_non_instance_prototype()) { |
Handle<Code> stub; |
FunctionPrototypeStub function_prototype_stub(isolate(), kind()); |
return function_prototype_stub.GetCode(); |