[wasm] Use a LazyInstance in wasm-linkage.cc to avoid a data race.
The initialization of static variables that were used originally caused a data race because multiple threads tried to initialize the variables at the same time. The use of a LazyInstance guarantees that the variables get initialized exactly once. The same problem also existed in c-linkage.cc. There I fixed the problem by using a local variable instead of a static variable. BUG=v8:5242 R=titzer@chromium.org Review-Url: https://codereview.chromium.org/2202433003 Cr-Commit-Position: refs/heads/master@{#38221}
Showing
Please
register
or
sign in
to comment