[wasm] Fix possible gc-ing of wasm code objects

If incremental GC starts before imports linking, and sees a wasm
function, it won't revisit that after the imports that function are linked.
As a result, the import code objects may be GC-ed. This change
addresses this issue.

BUG=

Review-Url: https://codereview.chromium.org/2113183002
Cr-Commit-Position: refs/heads/master@{#37507}
This commit is contained in:
mtrofin 2016-07-04 13:08:54 -07:00 committed by Commit bot
parent 3ca49d9aec
commit 462d57ae1f

View File

@ -372,7 +372,8 @@ bool LinkFunction(Handle<Code> unlinked,
Handle<Code> new_target = code_targets[index];
if (target != *new_target) {
it.rinfo()->set_target_address(new_target->instruction_start(),
SKIP_WRITE_BARRIER, SKIP_ICACHE_FLUSH);
UPDATE_WRITE_BARRIER,
SKIP_ICACHE_FLUSH);
modified = true;
}
}