Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 7c215c865ff02e140bdf1808258f6d0ecf061e77..e3924c9a9c4ea2cd329811f92dcc9f592a7323c8 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -728,6 +728,8 @@ Handle<Context> Factory::NewNativeContext() { |
context->set_native_context(*context); |
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; |
} |