Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cppgc NameProvider #1528

Merged
merged 1 commit into from
Sep 6, 2024
Merged

feat: cppgc NameProvider #1528

merged 1 commit into from
Sep 6, 2024

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Jul 12, 2024

implements NameProvider, but I didn't want RustObj to grow beyond 2 pointers, so replace it with a dyn pointer and use that to dispatch.

@devsnek devsnek marked this pull request as ready for review September 2, 2024 00:09
@devsnek devsnek force-pushed the name-trait branch 4 times, most recently from a1022c1 to 3ebec4c Compare September 2, 2024 04:46
@@ -44,6 +44,10 @@ fn cppgc_object_wrap() {
TRACE_COUNT.fetch_add(1, Ordering::SeqCst);
visitor.trace(&self.value);
}

fn get_name(&self) -> Option<&'static std::ffi::CStr> {
Some(c"Wrap")
Copy link
Member

Choose a reason for hiding this comment

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

test somewhere that you can see this value?

Copy link
Member Author

Choose a reason for hiding this comment

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

afaik there isn't really an easy way to test this since heap dumps need to be loaded into chrome to be read.

Copy link
Member

@ry ry Sep 5, 2024

Choose a reason for hiding this comment

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

maybe just see if it contains the byte string Wrap ? (maybe use a different magic string)

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@devsnek devsnek enabled auto-merge (squash) September 6, 2024 19:43
@devsnek devsnek merged commit b2ef529 into main Sep 6, 2024
12 checks passed
@devsnek devsnek deleted the name-trait branch September 6, 2024 22:35
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