| Index: src/contexts.cc
|
| diff --git a/src/contexts.cc b/src/contexts.cc
|
| index 01ce0d2a7f2bf77550ec013e86e0a45d75e76eaa..d4910eac03d6bf38a607d7c5f992b5907fc52a0e 100644
|
| --- a/src/contexts.cc
|
| +++ b/src/contexts.cc
|
| @@ -110,8 +110,10 @@ JSReceiver* Context::extension_receiver() {
|
| }
|
|
|
| ScopeInfo* Context::scope_info() {
|
| - DCHECK(IsModuleContext() || IsScriptContext() || IsBlockContext() ||
|
| - IsCatchContext() || IsWithContext() || IsDebugEvaluateContext());
|
| + DCHECK(!IsNativeContext());
|
| + if (IsFunctionContext() || IsModuleContext()) {
|
| + return closure()->shared()->scope_info();
|
| + }
|
| HeapObject* object = extension();
|
| if (object->IsContextExtension()) {
|
| DCHECK(IsBlockContext() || IsCatchContext() || IsWithContext() ||
|
|
|