Index: src/accessors.cc |
=================================================================== |
--- src/accessors.cc (revision 6761) |
+++ src/accessors.cc (working copy) |
@@ -447,6 +447,7 @@ |
JSFunction* function = FindInPrototypeChain<JSFunction>(object, &found_it); |
if (!found_it) return Heap::undefined_value(); |
if (!function->has_prototype()) { |
+ if (!function->should_have_prototype()) return Heap::undefined_value(); |
Object* prototype; |
{ MaybeObject* maybe_prototype = Heap::AllocateFunctionPrototype(function); |
if (!maybe_prototype->ToObject(&prototype)) return maybe_prototype; |