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

Unified Diff: src/contexts.cc

Issue 1158423002: Treat links that organize weak objects weakly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/deoptimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index b7617f746761e7edbeadde1c938febda64f71ed4..76f5225ce225ca174ae5a9a0c19b87db76b1cf1a 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -394,7 +394,8 @@ void Context::AddOptimizedFunction(JSFunction* function) {
DCHECK(function->next_function_link()->IsUndefined());
- function->set_next_function_link(get(OPTIMIZED_FUNCTIONS_LIST));
+ function->set_next_function_link(get(OPTIMIZED_FUNCTIONS_LIST),
+ UPDATE_WEAK_WRITE_BARRIER);
set(OPTIMIZED_FUNCTIONS_LIST, function, UPDATE_WEAK_WRITE_BARRIER);
}
@@ -412,9 +413,11 @@ void Context::RemoveOptimizedFunction(JSFunction* function) {
set(OPTIMIZED_FUNCTIONS_LIST, element_function->next_function_link(),
UPDATE_WEAK_WRITE_BARRIER);
} else {
- prev->set_next_function_link(element_function->next_function_link());
+ prev->set_next_function_link(element_function->next_function_link(),
+ UPDATE_WEAK_WRITE_BARRIER);
}
- element_function->set_next_function_link(GetHeap()->undefined_value());
+ element_function->set_next_function_link(GetHeap()->undefined_value(),
+ UPDATE_WEAK_WRITE_BARRIER);
return;
}
prev = element_function;
« no previous file with comments | « no previous file | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698