| Index: src/ic.cc
|
| ===================================================================
|
| --- src/ic.cc (revision 4462)
|
| +++ src/ic.cc (working copy)
|
| @@ -615,7 +615,8 @@
|
| }
|
|
|
| // Use specialized code for getting prototype of functions.
|
| - if (object->IsJSFunction() && name->Equals(Heap::prototype_symbol())) {
|
| + if (object->IsJSFunction() && name->Equals(Heap::prototype_symbol()) &&
|
| + JSFunction::cast(*object)->should_have_prototype()) {
|
| #ifdef DEBUG
|
| if (FLAG_trace_ic) PrintF("[LoadIC : +#prototype /function]\n");
|
| #endif
|
| @@ -824,7 +825,8 @@
|
| }
|
|
|
| // Use specialized code for getting prototype of functions.
|
| - if (object->IsJSFunction() && name->Equals(Heap::prototype_symbol())) {
|
| + if (object->IsJSFunction() && name->Equals(Heap::prototype_symbol()) &&
|
| + JSFunction::cast(*object)->should_have_prototype()) {
|
| Handle<JSFunction> function = Handle<JSFunction>::cast(object);
|
| Object* code =
|
| StubCache::ComputeKeyedLoadFunctionPrototype(*name, *function);
|
|
|