feat: expose inspector value subtype callbacks - #2038
Open
satouriko wants to merge 1 commit into
Open
Conversation
V8InspectorClient exposes valueSubtype and descriptionForValueSubtype, but rusty_v8 did not forward them, preventing embedders from customizing Runtime.RemoteObject subtype and description metadata. Rust and C++ bindings: - add source-compatible default trait methods that receive scoped Local values - establish V8 and Rust callback scopes before invoking client implementations - transfer optional StringBuffer results using existing unique-pointer ownership conventions Tests: - cover a marked object receiving a custom subtype and description through Runtime.evaluate - verify ordinary objects retain V8's default representation Verification: - cargo fmt --check - clang-format-19 --verbose --Werror --dry-run src/*.cc src/*.hpp src/*.h - V8_FROM_SOURCE=1 LIBCLANG_PATH=/usr/lib/llvm-19/lib cargo clippy --all-targets --locked -- -D clippy::all - V8_FROM_SOURCE=1 LIBCLANG_PATH=/usr/lib/llvm-19/lib cargo nextest run --all-targets --locked (287 passed)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2032.
Summary
Expose V8 Inspector's
valueSubtypeanddescriptionForValueSubtypecallbacks to Rust embedders.
V8InspectorClientImplLocal<Value>handles to the Rust callbacksUniquePtr<StringBuffer>, following the existing ownership patternTesting
cargo fmt --checkclang-format-19 --verbose --Werror --dry-run src/*.cc src/*.hpp src/*.hV8_FROM_SOURCE=1 LIBCLANG_PATH=/usr/lib/llvm-19/lib cargo clippy --all-targets --locked -- -D clippy::allV8_FROM_SOURCE=1 LIBCLANG_PATH=/usr/lib/llvm-19/lib cargo nextest run --all-targets --locked