Descriptiond8 workers: Fix transferring SharedArrayBuffer to multiple Workers. (try 2)
Note: the previous try was reverted for occasional flaky tests. This continued
after the revert, and should be fixed by
https://codereview.chromium.org/1226143003.
Previously, the serialization code would call Externalize for every transferred
ArrayBuffer or SharedArrayBuffer, but that function can only be called once. If
the buffer is already externalized, we should call GetContents instead.
Also fix use-after-free bug when transferring ArrayBuffers. The transferred
ArrayBuffer must be internalized in the new isolate, or be managed by the
Shell. The current code gives it to the isolate externalized and frees it
immediately afterward when the SerializationData object is destroyed.
BUG=chromium:497295
R=jarin@chromium.org
LOG=n
Committed: https://crrev.com/5a9722b2ab107b0b8d97f925609d9d2f2939eecc
Cr-Commit-Position: refs/heads/master@{#29658}
Patch Set 1 #Patch Set 2 : Remove printf in ~Worker #Patch Set 3 : merge tsan fixes #Patch Set 4 : more tsan fixes #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 6 (2 generated)
|