Index: src/contexts.cc |
diff --git a/src/contexts.cc b/src/contexts.cc |
index 50c4386a362f92dae9c36d99b75521aad25901f7..a1ad16a46f33a70512cee69f29403959ec4230f1 100644 |
--- a/src/contexts.cc |
+++ b/src/contexts.cc |
@@ -82,8 +82,8 @@ Context* Context::declaration_context() { |
JSObject* Context::extension_object() { |
DCHECK(IsNativeContext() || IsFunctionContext() || IsBlockContext()); |
- Object* object = extension(); |
- if (object == nullptr) return nullptr; |
+ HeapObject* object = extension(); |
+ if (object->IsTheHole()) return nullptr; |
if (IsBlockContext()) { |
if (!object->IsSloppyBlockWithEvalContextExtension()) return nullptr; |
object = SloppyBlockWithEvalContextExtension::cast(object)->extension(); |
@@ -103,7 +103,7 @@ JSReceiver* Context::extension_receiver() { |
ScopeInfo* Context::scope_info() { |
DCHECK(IsModuleContext() || IsScriptContext() || IsBlockContext()); |
- Object* object = extension(); |
+ HeapObject* object = extension(); |
if (object->IsSloppyBlockWithEvalContextExtension()) { |
DCHECK(IsBlockContext()); |
object = SloppyBlockWithEvalContextExtension::cast(object)->scope_info(); |