Reviewers: Hannes Payer,

Message:
I am resurrecting this ancient fix (without the flag enabling). I assume a
review from 2 years and 1 month ago still counts? :P

Description:
Fix bug when optimized code map is evicted.

This makes sure that both, the shared function info and it's optimized
code map get revisited when the code map is evicted from the flusher.

[email protected]
TEST=mjsunit/debug-set-variable-value

Please review this at https://codereview.chromium.org/14703009/

Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+4, -3 lines):
  M src/heap/mark-compact.cc


Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index e465977d4efcf26e8a252dbb05524a07913d4836..bfc3e8f2ffe3353e19640c06a9571fcfa3849aa0 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -1056,11 +1056,12 @@ void CodeFlusher::EvictCandidate(JSFunction* function) {


void CodeFlusher::EvictOptimizedCodeMap(SharedFunctionInfo* code_map_holder) {
-  DCHECK(!FixedArray::cast(code_map_holder->optimized_code_map())
-              ->get(SharedFunctionInfo::kNextMapIndex)
-              ->IsUndefined());
+  FixedArray* code_map =
+      FixedArray::cast(code_map_holder->optimized_code_map());
+  DCHECK(!code_map->get(SharedFunctionInfo::kNextMapIndex)->IsUndefined());

   // Make sure previous flushing decisions are revisited.
+  isolate_->heap()->incremental_marking()->RecordWrites(code_map);
   isolate_->heap()->incremental_marking()->RecordWrites(code_map_holder);

   if (FLAG_trace_code_flushing) {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to