DescriptionFix bug when transferring SharedArrayBuffer to multiple Workers.
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/dd7962bf7838f8379ba776ee6b7b0e4d3bec2140
Cr-Commit-Position: refs/heads/master@{#29499}
Patch Set 1 #Patch Set 2 : Worker owns transferred ArrayBuffer::Contents #Patch Set 3 : internalize transferred ArrayBuffer #
Total comments: 3
Dependent Patchsets: Messages
Total messages: 21 (2 generated)
|