| Index: src/stub-cache.cc
|
| diff --git a/src/stub-cache.cc b/src/stub-cache.cc
|
| index 91cb3870df97e330b9c960655458fd06fd732c90..06c160485342945260c741abba5df1f8c661b9f5 100644
|
| --- a/src/stub-cache.cc
|
| +++ b/src/stub-cache.cc
|
| @@ -559,11 +559,11 @@ RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly) {
|
|
|
|
|
| static Object* ThrowReferenceError(Isolate* isolate, Name* name) {
|
| - // If the load is non-contextual, just return the undefined result.
|
| + // If the load is inside typeof, just return the undefined result.
|
| // Note that both keyed and non-keyed loads may end up here.
|
| HandleScope scope(isolate);
|
| LoadIC ic(IC::NO_EXTRA_FRAME, isolate);
|
| - if (ic.contextual_mode() != CONTEXTUAL) {
|
| + if (ic.typeof_state() == INSIDE_TYPEOF) {
|
| return isolate->heap()->undefined_value();
|
| }
|
|
|
|
|