-
Shu-yu Guo authored
Shared values need to be kept alive while being conveyed across threads (i.e. by postMessage). Currently they are meant to be conveyed through the serializer/deserializer by the embedder via API. This both clunky and the embedder has no good choice for what to do, because the most natural choice is v8::Global and it is not designed to be threadsafe. This CL removes the API and transparently handles conveying shared values by using a wrapper around PersistentHandles called SharedValueConveyors. Any isolate can own the conveyor provided it outlives the receipt of the message by the receiving isolate. For simpler lifetime management, the shared isolate currently owns all conveyors. Bug: v8:12547 Change-Id: I8f71b2faa0f8a1973f8b97ffccf4f5ad230f4e16 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3857453Reviewed-by: Jakob Linke <jgruber@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#82795}
75240892
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
DIR_METADATA | ||
OWNERS | ||
api-arguments-inl.h | ||
api-arguments.cc | ||
api-arguments.h | ||
api-inl.h | ||
api-macros-undef.h | ||
api-macros.h | ||
api-natives.cc | ||
api-natives.h | ||
api.cc | ||
api.h |