Commit 316ff3d8 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

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.

R=hpayer@chromium.org
TEST=mjsunit/debug-set-variable-value

Review URL: https://codereview.chromium.org/14703009

Cr-Commit-Position: refs/heads/master@{#29387}
parent 8fdcd13b
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment