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

Unified Diff: src/contexts.cc

Issue 11360062: Revert r12825 and r12796 from trunk. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 1 month 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/heap.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 fbb2f1a33c6f85c86e0978bcc8011630aeb8ef1b..93c9795404bb52690c6cc3c4e1b560b4f9a076c6 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -251,6 +251,8 @@ void Context::AddOptimizedFunction(JSFunction* function) {
}
}
+ CHECK(function->next_function_link()->IsUndefined());
+
// Check that the context belongs to the weak native contexts list.
bool found = false;
Object* context = GetHeap()->native_contexts_list();
@@ -263,16 +265,6 @@ void Context::AddOptimizedFunction(JSFunction* function) {
}
CHECK(found);
#endif
-
- // If the function link field is already used then the function was
- // enqueued as a code flushing candidate and we remove it now.
- if (!function->next_function_link()->IsUndefined()) {
- CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher();
- flusher->EvictCandidate(function);
- }
-
- ASSERT(function->next_function_link()->IsUndefined());
-
function->set_next_function_link(get(OPTIMIZED_FUNCTIONS_LIST));
set(OPTIMIZED_FUNCTIONS_LIST, function);
}
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698