| Index: src/stub-cache.cc
|
| diff --git a/src/stub-cache.cc b/src/stub-cache.cc
|
| index ec8f6bdf25b949d8c962788f9ed87fd762ed9d07..c7f4f9438602ac44dee8de379b6ee1f1265f92b0 100644
|
| --- a/src/stub-cache.cc
|
| +++ b/src/stub-cache.cc
|
| @@ -1452,13 +1452,13 @@ Handle<Code> ConstructStubCompiler::GetCode() {
|
|
|
|
|
| CallOptimization::CallOptimization(LookupResult* lookup) {
|
| - if (!lookup->IsProperty() ||
|
| - !lookup->IsCacheable() ||
|
| - lookup->type() != CONSTANT_FUNCTION) {
|
| - Initialize(Handle<JSFunction>::null());
|
| - } else {
|
| + if (lookup->IsFound() &&
|
| + lookup->IsCacheable() &&
|
| + lookup->type() == CONSTANT_FUNCTION) {
|
| // We only optimize constant function calls.
|
| Initialize(Handle<JSFunction>(lookup->GetConstantFunction()));
|
| + } else {
|
| + Initialize(Handle<JSFunction>::null());
|
| }
|
| }
|
|
|
|
|