| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index c3ed767d9f6cd7581beb4537e05c8cc770c7c353..9625d2123eda7ebfea1a1c52ce6a320a06b6cdb3 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -191,6 +191,17 @@ static bool TryRemoveInvalidPrototypeDependentStub(Code* target,
|
| if (Name::cast(name) != stub_name) return false;
|
| }
|
|
|
| + if (receiver->IsGlobalObject()) {
|
| + if (!name->IsName()) return false;
|
| + Isolate* isolate = target->GetIsolate();
|
| + LookupResult lookup(isolate);
|
| + GlobalObject* global = GlobalObject::cast(receiver);
|
| + global->LocalLookupRealNamedProperty(Name::cast(name), &lookup);
|
| + if (!lookup.IsFound()) return false;
|
| + PropertyCell* cell = global->GetPropertyCell(&lookup);
|
| + return cell->type()->IsConstant();
|
| + }
|
| +
|
| InlineCacheHolderFlag cache_holder =
|
| Code::ExtractCacheHolderFromFlags(target->flags());
|
|
|
|
|