Chromium Code Reviews| Index: src/ic/ic.cc |
| diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
| index 8977232bd74760eff3421fdebf73b950fd372e22..536da6a9f6c0dbe2c0a90f5cb6bc9122945db655 100644 |
| --- a/src/ic/ic.cc |
| +++ b/src/ic/ic.cc |
| @@ -735,7 +735,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) { |
| LookupIterator it(object, name); |
| LookupForRead(&it); |
| - if (it.IsFound() || !IsUndeclaredGlobal(object)) { |
| + if (it.IsFound() || typeof_mode() == INSIDE_TYPEOF) { |
|
Toon Verwaest
2015/07/10 15:41:31
typeof_mode() == INSIDE_TYPEOF is not the same as
Igor Sheludko
2015/07/13 12:17:09
Done.
|
| // Update inline cache and stub cache. |
| if (use_ic) UpdateCaches(&it); |
| @@ -746,7 +746,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) { |
| isolate(), result, Object::GetProperty(&it, language_mode()), Object); |
| if (it.IsFound()) { |
| return result; |
| - } else if (!IsUndeclaredGlobal(object)) { |
| + } else if (typeof_mode() == INSIDE_TYPEOF) { |
|
Toon Verwaest
2015/07/10 15:41:31
Same here.
Igor Sheludko
2015/07/13 12:17:09
Done.
|
| LOG(isolate(), SuspectReadEvent(*name, *object)); |
| return result; |
| } |
| @@ -2989,7 +2989,7 @@ static Object* ThrowReferenceError(Isolate* isolate, Name* name) { |
| // Note that both keyed and non-keyed loads may end up here. |
| HandleScope scope(isolate); |
| LoadIC ic(IC::NO_EXTRA_FRAME, isolate, true); |
| - if (ic.contextual_mode() != CONTEXTUAL) { |
| + if (ic.typeof_mode() == INSIDE_TYPEOF) { |
| return isolate->heap()->undefined_value(); |
| } |