Chromium Code Reviews| Index: src/contexts.cc |
| diff --git a/src/contexts.cc b/src/contexts.cc |
| index 9adccb2897778611d6a89556561218371791175e..642e4741643916950781526fabbe75ebdf9328ef 100644 |
| --- a/src/contexts.cc |
| +++ b/src/contexts.cc |
| @@ -90,22 +90,23 @@ Context* Context::closure_context() { |
| } |
| JSObject* Context::extension_object() { |
| - DCHECK(IsNativeContext() || IsFunctionContext() || IsBlockContext()); |
| + DCHECK(IsNativeContext() || IsFunctionContext() || IsBlockContext() || |
| + IsDebugEvaluateContext()); |
|
Yang
2016/04/05 08:28:01
I don't think this can happen. We don't even expec
|
| HeapObject* object = extension(); |
| if (object->IsTheHole()) return nullptr; |
| if (IsBlockContext()) { |
| if (!object->IsSloppyBlockWithEvalContextExtension()) return nullptr; |
| object = SloppyBlockWithEvalContextExtension::cast(object)->extension(); |
| } |
| - DCHECK(object->IsJSContextExtensionObject() || |
| + DCHECK(object->IsJSContextExtensionObject() || IsDebugEvaluateContext() || |
| (IsNativeContext() && object->IsJSGlobalObject())); |
| return JSObject::cast(object); |
| } |
| JSReceiver* Context::extension_receiver() { |
| - DCHECK(IsNativeContext() || IsWithContext() || |
| - IsFunctionContext() || IsBlockContext()); |
| + DCHECK(IsNativeContext() || IsWithContext() || IsFunctionContext() || |
| + IsBlockContext() || IsDebugEvaluateContext()); |
|
Yang
2016/04/05 08:28:01
This should not happen. The only place I can see t
|
| return IsWithContext() ? JSReceiver::cast(extension()) : extension_object(); |
| } |