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

Unified Diff: src/contexts.cc

Issue 1152153004: Treat weak references in context weakly in write barrier. (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 | « src/bootstrapper.cc ('k') | src/heap/objects-visiting.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 12eb871e15ddbe5eb9acb67acb4485fcec01c258..b7617f746761e7edbeadde1c938febda64f71ed4 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -395,7 +395,7 @@ void Context::AddOptimizedFunction(JSFunction* function) {
DCHECK(function->next_function_link()->IsUndefined());
function->set_next_function_link(get(OPTIMIZED_FUNCTIONS_LIST));
ulan 2015/05/27 13:35:51 set_next_function_link should be weak too. Is this
Hannes Payer (out of office) 2015/05/27 13:48:59 Next CL together with the other weak next function
- set(OPTIMIZED_FUNCTIONS_LIST, function);
+ set(OPTIMIZED_FUNCTIONS_LIST, function, UPDATE_WEAK_WRITE_BARRIER);
}
@@ -409,7 +409,8 @@ void Context::RemoveOptimizedFunction(JSFunction* function) {
element_function->next_function_link()->IsJSFunction());
if (element_function == function) {
if (prev == NULL) {
- set(OPTIMIZED_FUNCTIONS_LIST, element_function->next_function_link());
+ set(OPTIMIZED_FUNCTIONS_LIST, element_function->next_function_link(),
+ UPDATE_WEAK_WRITE_BARRIER);
} else {
prev->set_next_function_link(element_function->next_function_link());
}
@@ -425,7 +426,7 @@ void Context::RemoveOptimizedFunction(JSFunction* function) {
void Context::SetOptimizedFunctionsListHead(Object* head) {
DCHECK(IsNativeContext());
- set(OPTIMIZED_FUNCTIONS_LIST, head);
+ set(OPTIMIZED_FUNCTIONS_LIST, head, UPDATE_WEAK_WRITE_BARRIER);
}
@@ -440,13 +441,13 @@ void Context::AddOptimizedCode(Code* code) {
DCHECK(code->kind() == Code::OPTIMIZED_FUNCTION);
DCHECK(code->next_code_link()->IsUndefined());
code->set_next_code_link(get(OPTIMIZED_CODE_LIST));
- set(OPTIMIZED_CODE_LIST, code);
+ set(OPTIMIZED_CODE_LIST, code, UPDATE_WEAK_WRITE_BARRIER);
}
void Context::SetOptimizedCodeListHead(Object* head) {
DCHECK(IsNativeContext());
- set(OPTIMIZED_CODE_LIST, head);
+ set(OPTIMIZED_CODE_LIST, head, UPDATE_WEAK_WRITE_BARRIER);
}
@@ -458,7 +459,7 @@ Object* Context::OptimizedCodeListHead() {
void Context::SetDeoptimizedCodeListHead(Object* head) {
DCHECK(IsNativeContext());
- set(DEOPTIMIZED_CODE_LIST, head);
+ set(DEOPTIMIZED_CODE_LIST, head, UPDATE_WEAK_WRITE_BARRIER);
}
« no previous file with comments | « src/bootstrapper.cc ('k') | src/heap/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698