Reviewers: jarin,

Description:
Fix 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
SerializationData can't free the externalized ArrayBuffer data, because it is
still be used by the worker!

BUG=chromium:497295
[email protected]
LOG=n

Please review this at https://codereview.chromium.org/1215233004/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+107, -57 lines):
  M src/d8.h
  M src/d8.cc
  M test/mjsunit/d8-worker-sharedarraybuffer.js


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to