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

Unified Diff: src/bootstrapper.cc

Issue 3764011: Link all global contexts into a weak list. (Closed)
Patch Set: Created 10 years, 2 months 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 | src/contexts.h » ('j') | src/contexts.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index aa8d8e5ac22acc53282278b28413dedd5dc90e3c..d7491e1f1f6fb5cc0d80777ffbde5d121cc18ef8 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1814,6 +1814,11 @@ Genesis::Genesis(Handle<Object> global_object,
i::Counters::contexts_created_from_scratch.Increment();
}
+ // Add this context to the weak list of global contexts.
+ (*global_context_)->set(Context::NEXT_CONTEXT_LINK,
+ Heap::global_contexts_list());
+ Heap::set_global_contexts_list(*global_context_);
+
result_ = global_context_;
}
« no previous file with comments | « no previous file | src/contexts.h » ('j') | src/contexts.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698