| Index: src/runtime/runtime-scopes.cc
|
| diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
|
| index e03b85028fe1365a36c8b8f2b9d9db42ccff1b7c..7a2f5146e2268ade4458ea7978b4f4e1a8a7a74b 100644
|
| --- a/src/runtime/runtime-scopes.cc
|
| +++ b/src/runtime/runtime-scopes.cc
|
| @@ -306,9 +306,11 @@ RUNTIME_FUNCTION(Runtime_InitializeLegacyConstLookupSlot) {
|
|
|
| // The declared const was configurable, and may have been deleted in the
|
| // meanwhile. If so, re-introduce the variable in the context extension.
|
| - DCHECK(context_arg->has_extension());
|
| if (attributes == ABSENT) {
|
| - holder = handle(context_arg->extension(), isolate);
|
| + Handle<Context> declaration_context(context_arg->declaration_context());
|
| + DCHECK(declaration_context->has_extension());
|
| + holder = handle(declaration_context->extension(), isolate);
|
| + CHECK(holder->IsJSObject());
|
| } else {
|
| // For JSContextExtensionObjects, the initializer can be run multiple times
|
| // if in a for loop: for (var i = 0; i < 2; i++) { const x = i; }. Only the
|
|
|