Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 6939fc35ddfd0240fc7b342695fc369c8bc4faa2..83b183c4c0a384e1d3d5180a51a32e7de9fa3b37 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -373,6 +373,9 @@ void Bootstrapper::DetachGlobal(Handle<Context> env) { |
global_proxy->set_native_context(*factory->null_value()); |
SetObjectPrototype(global_proxy, factory->null_value()); |
global_proxy->map()->set_constructor(*factory->null_value()); |
+ if (FLAG_track_detached_contexts) { |
+ env->GetIsolate()->AddDetachedContext(env); |
+ } |
} |