Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 79f2ef1cae3d0372267975caca0039b66ff6c8b5..42056853c059c6dde29a7d436e00600b6a7f6f60 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -728,6 +728,8 @@ Handle<Context> Factory::NewNativeContext() { |
Handle<Context> context = Handle<Context>::cast(array); |
context->set_js_array_maps(*undefined_value()); |
context->set_errors_thrown(Smi::FromInt(0)); |
+ Handle<WeakCell> weak_cell = NewWeakCell(context); |
+ context->set_self_weak_cell(*weak_cell); |
DCHECK(context->IsNativeContext()); |
return context; |
} |