910def9edc
Each thread has its own MarkingBarrier instance for incremental marking. A thread local variable is used to get the current thread's instance on background threads. However on main threads this thread local variable was always set to nullptr. The main thread would get to its own instance through the heap_ field in the host object's page header. This was solved this way because setting current_marking_barrier on the main thread seemed quite complex. Multiple isolates may be run on the same thread and isolates may even be migrated between threads. However, with --shared-space loading the heap_ field for a shared object would return the main isolate's heap and we end up with the wrong MarkingBarrier instance on client isolates. So this CL makes main and background threads more uniform by setting the thread local field also on the main thread. The field is set by the already existing v8::Isolate::Scope API. Some embedders might have to add these scopes if they don't use them properly already. Bug: v8:13267 Change-Id: Idfdaf35073d04dd5e13ad6065ef42eae3ce6a259 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3998633 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#84144} |
||
---|---|---|
.. | ||
console | ||
cpu-profiler | ||
debugger | ||
heap-profiler | ||
regress | ||
runtime | ||
sessions | ||
BUILD.gn | ||
DEPS | ||
DIR_METADATA | ||
frontend-channel.h | ||
inspector-test.cc | ||
inspector.status | ||
isolate-data.cc | ||
isolate-data.h | ||
json-parse-expected.txt | ||
json-parse.js | ||
OWNERS | ||
print-method-not-found-expected.txt | ||
print-method-not-found.js | ||
protocol-test.js | ||
task-runner.cc | ||
task-runner.h | ||
tasks.cc | ||
tasks.h | ||
testcfg.py | ||
utils.cc | ||
utils.h | ||
wasm-inspector-test.js |