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

Unified Diff: src/factory.cc

Issue 1508703002: Use WeakCells in the optimized code map rather than traversing in pause. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed nit. Created 5 years 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 | « src/deoptimizer.h ('k') | src/heap/gc-tracer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index f2dcc471fb085a3d30671c439fb7ac85f091b190..6e2587facd0a802e874fda122927112a6b87c2ee 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;
}
« no previous file with comments | « src/deoptimizer.h ('k') | src/heap/gc-tracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698