Files
Yang Guo fb8a01b375 [inspector] Remove Script::context_data and reconstruct script contexts
When a script is shared across execution contexts via the compilation
cache, Script::context_data retained only the first compiling context's
ID. If that context was destroyed before Debugger.enable was called, the
script was omitted for surviving contexts that still share it.

Instead of storing Script::context_data, maintain an ephemeron hash table
mapping Script to WeakArrayList of NativeContexts in Debug, and
reconstruct the per-context script mapping in
V8Debugger::getCompiledScripts when Debugger.enable is called. Use the
current context for newly compiled scripts and blackbox checks. Move the
embedded-script marker to a bitfield flag on Script.

TAG=agy
CONV=79983b38-0e64-4720-ab7a-204bed033024

Fixed: 546189137
Change-Id: Iea5384eb90b6187bb8edd98fb1a132ac4f650a44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8557700
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#111231}
2026-10-27 09:35:21 -07:00
..