Skip to content

Rust JSG: use #[jsg_traced] for the ok-drop compile test's Binding - #8762

Merged
littledivy merged 1 commit into
mainfrom
littledivy/2026-11-21-rjsg-traced-ctests
Nov 24, 2026
Merged

littledivy merged 1 commit into
mainfrom
littledivy/2026-11-21-rjsg-traced-ctests

Conversation

@littledivy

Copy link
Copy Markdown
Member

Binding in ok-drop-without-gc-references.rs holds only a Vec<u8>, but still used jsg_traced_unchecked!, which checks nothing.

In this patch it uses #[jsg_traced], which checks that the field holds no GC references. The other uses of the unchecked macro wrap types from outside JSG, hold a strong v8::Global, or are the generic <T> form.

`Binding` in ok-drop-without-gc-references.rs holds only a `Vec<u8>`, but still used `jsg_traced_unchecked!`, which checks nothing.

In this patch it uses `#[jsg_traced]`, which checks that the field holds no GC references. The other uses of the unchecked macro wrap types from outside JSG, hold a strong `v8::Global`, or are the generic `<T>` form.
@littledivy
littledivy requested review from a team as code owners November 21, 2026 02:52

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved — The change is a two-line test cleanup. No issues were found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code reviewer: ✅ LGTM

No issues found.


Reviewed commit: bb7d77ef

@littledivy
littledivy merged commit fbdd5e0 into main Nov 24, 2026
23 checks passed
@littledivy
littledivy deleted the littledivy/2026-11-21-rjsg-traced-ctests branch November 24, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants