Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1007)

Unified Diff: src/runtime/runtime-scopes.cc

Issue 756293004: Introduce legacy const slots in correct context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-410030.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-410030.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698