Commit c938f0df authored by mtrofin's avatar mtrofin Committed by Commit bot

[wasm] explicitly mark off unlinked wasm module instances

This fixes a gc stress bug. We cannot rely on an ordering of
clearing of the weak cells, so we explicitly reset the weak
link to the owning instance, when finalizing a compiled
module. In turn, this serves as a reliable signal when GCs
happen while instantiating, allowing us to correctly link the
new instance.

BUG=chromium:652425

Review-Url: https://codereview.chromium.org/2393443003
Cr-Commit-Position: refs/heads/master@{#39964}
parent 1744727d
......@@ -773,7 +773,6 @@ static void ResetCompiledModule(Isolate* isolate, JSObject* owner,
}
}
}
compiled_module->reset_weak_owning_instance();
compiled_module->reset_heap();
}
......@@ -831,6 +830,7 @@ static void InstanceFinalizer(const v8::WeakCallbackInfo<void>& data) {
}
}
}
compiled_module->reset_weak_owning_instance();
GlobalHandles::Destroy(reinterpret_cast<Object**>(p));
}
......
This diff is collapsed.
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