v8/include
Shu-yu Guo 7524089264 [shared-struct] Use PersistentHandles to convey shared values
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/+/3857453
Reviewed-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}
2022-08-29 19:44:47 +00:00
..
cppgc Fix build with -Wextra-semi 2022-08-25 09:19:28 +00:00
libplatform [api] Advance API deprecation for methods last changed in v9.7 2022-01-26 17:30:21 +00:00
APIDesign.md Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
DEPS cppgc: Implement process-global state accessors. 2021-02-17 22:37:24 +00:00
DIR_METADATA Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
js_protocol-1.2.json Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
js_protocol-1.3.json Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
js_protocol.pdl [wasm][devtools] Fix reported function body offsets 2022-07-22 10:08:32 +00:00
OWNERS [owners] Adjust ownership for v8-debug.h. 2021-12-30 08:04:21 +00:00
v8-array-buffer.h [api] Add more efficient API for accesssing ArrayBuffer raw data 2022-07-15 09:03:11 +00:00
v8-callbacks.h [wasm][API] Remove deprecated API 2022-08-29 10:43:55 +00:00
v8-container.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-context.h [sandbox] Prepare ExternalPointerTable rollout 2022-07-11 13:34:54 +00:00
v8-cppgc.h Reland "[cppgc-js] Allow overriding marking support" 2022-08-24 13:41:30 +00:00
v8-data.h [api] Introduce new HostImportModuleDynamicallyCallback 2021-11-05 14:35:43 +00:00
v8-date.h Fix Date BiDi format 2022-07-11 17:19:43 +00:00
v8-debug.h Introduce v8::StackTrace::CurrentScriptNameOrSourceURL 2022-01-17 11:34:28 +00:00
v8-embedder-heap.h [api, heap] Deprecate v8::EmbedderHeapTracer 2022-08-24 09:03:00 +00:00
v8-embedder-state-scope.h Shift EmbedderState values next to each other 2022-01-10 17:43:47 +00:00
v8-exception.h [api] Rename isolate variables 2022-04-28 12:51:08 +00:00
v8-extension.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-external.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-fast-api-calls.h [fastcall] Implement support for Uint8Array arguments 2022-07-22 09:05:41 +00:00
v8-forward.h [include] Add TryCatch and Extension to v8-forward.h 2021-09-23 13:15:10 +00:00
v8-function-callback.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-function.h Implement Function::Experimental_IsNopFunction. 2022-08-01 01:36:02 +00:00
v8-initialization.h [sandbox] Remove V8::InitializeSandbox 2022-08-19 09:06:37 +00:00
v8-inspector-protocol.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-inspector.h [api] Advance API deprecation 2022-08-16 08:11:57 +00:00
v8-internal.h [sandbox] Unsandboxify CodeEntryPoint 2022-08-29 13:12:36 +00:00
v8-isolate.h [wasm][API] Remove deprecated API 2022-08-29 10:43:55 +00:00
v8-json.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-local-handle.h [api] Fix MaybeLocal::ToLocal documentation when it's empty 2022-05-03 10:03:24 +00:00
v8-locker.h [api] Advance API deprecation 2022-08-16 08:11:57 +00:00
v8-maybe.h api: Allow v8::Maybe<MovableType>. 2022-04-30 21:47:24 +00:00
v8-memory-span.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-message.h [api] Advance API deprecation 2022-08-16 08:11:57 +00:00
v8-metrics.h [wasm][API] Remove deprecated API 2022-08-29 10:43:55 +00:00
v8-microtask-queue.h [api] Rename isolate variables 2022-04-28 12:51:08 +00:00
v8-microtask.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-object.h [sandbox] Prepare ExternalPointerTable rollout 2022-07-11 13:34:54 +00:00
v8-persistent-handle.h [api] Remove deprecated global handle APIs 2022-06-09 15:39:03 +00:00
v8-platform.h [API] Deprecate second OnCriticalMemoryPressure 2022-08-22 15:58:58 +00:00
v8-primitive-object.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-primitive.h [sandbox] Turn ExternalPointerTag into a template parameter 2022-06-27 13:45:20 +00:00
v8-profiler.h [logging] Use short "JS:" prefix for function log events 2022-06-14 16:11:21 +00:00
v8-promise.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-proxy.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-regexp.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-script.h [api] Advance API deprecation 2022-08-16 08:11:57 +00:00
v8-snapshot.h Remove many superfluous STL includes in headers. 2022-01-13 20:56:45 +00:00
v8-statistics.h [api][profiler] Surface CpuProfiler memory in HeapCodeStatistics 2021-11-04 11:01:09 +00:00
v8-template.h [api] Add more comments about interceptor callbacks 2022-05-25 11:38:44 +00:00
v8-traced-handle.h [api] Remove TracedGlobal<> 2022-03-23 21:04:51 +00:00
v8-typed-array.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-unwinder-state.h Reland "[riscv32] Add RISCV32 backend" 2022-08-04 12:47:44 +00:00
v8-unwinder.h Reland "[profiler] Surface VM & Embedder State" 2021-12-07 19:00:07 +00:00
v8-util.h [api] Deprecate PersistentValueVector 2022-06-09 08:44:13 +00:00
v8-value-serializer-version.h Reland^2 "[string] Support shared strings in Value{Serializer,Deserializer}" 2022-01-26 21:00:12 +00:00
v8-value-serializer.h [shared-struct] Use PersistentHandles to convey shared values 2022-08-29 19:44:47 +00:00
v8-value.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
v8-version-string.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-version.h Version 10.7.0 2022-08-18 09:17:36 +00:00
v8-wasm-trap-handler-posix.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-wasm-trap-handler-win.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-wasm.h [wasm][API] Remove deprecated API 2022-08-29 10:43:55 +00:00
v8-weak-callback-info.h [api] Remove APIs for resurrecting finalizers 2022-04-21 07:05:25 +00:00
v8.h Remove many superfluous STL includes in headers. 2022-01-13 20:56:45 +00:00
v8config.h [sandbox] Remove a number of native allocations from WasmInstanceObject 2022-08-29 09:53:35 +00:00