| Index: src/ic/ic.cc
|
| diff --git a/src/ic/ic.cc b/src/ic/ic.cc
|
| index 8036a6ede1d6618e07235f0e2dcb2ea6ba491971..d0866304e08326dbd6a4a26bddc2084086ebcc66 100644
|
| --- a/src/ic/ic.cc
|
| +++ b/src/ic/ic.cc
|
| @@ -258,6 +258,10 @@ static void LookupForRead(LookupIterator* it) {
|
|
|
| bool IC::ShouldRecomputeHandler(Handle<Object> receiver, Handle<String> name) {
|
| if (!RecomputeHandlerForName(name)) return false;
|
| + // This is a contextual access, always just update the handler and stay
|
| + // monomorphic.
|
| + if (receiver->IsJSGlobalObject()) return true;
|
| +
|
| DCHECK(UseVector());
|
| maybe_handler_ = nexus()->FindHandlerForMap(receiver_map());
|
|
|
| @@ -276,15 +280,6 @@ bool IC::ShouldRecomputeHandler(Handle<Object> receiver, Handle<String> name) {
|
| receiver_map()->elements_kind());
|
| }
|
|
|
| - if (receiver->IsJSGlobalObject()) {
|
| - Handle<JSGlobalObject> global = Handle<JSGlobalObject>::cast(receiver);
|
| - LookupIterator it(global, name, LookupIterator::OWN_SKIP_INTERCEPTOR);
|
| - if (it.state() == LookupIterator::ACCESS_CHECK) return false;
|
| - if (!it.IsFound()) return false;
|
| - if (!it.GetHolder<JSReceiver>()->IsJSGlobalObject()) return false;
|
| - return it.property_details().cell_type() == PropertyCellType::kConstant;
|
| - }
|
| -
|
| return true;
|
| }
|
|
|
|
|