-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[runtime] Fix some more gc tracking problems in create_cattr_named/typed_arg. #39856
Conversation
Tagging subscribers to this area: @CoffeeFlux |
src/mono/mono/metadata/handle.h
Outdated
@@ -367,6 +367,9 @@ typedef struct _MonoTypeofCastHelper *MonoTypeofCastHelper; // a pointer type un | |||
|
|||
#define MONO_HANDLE_CAST(type, value) (MONO_HANDLE_CAST_FOR (type) ((value).__raw)) | |||
|
|||
/* Simpler version if the handle is not used */ | |||
#define MONO_HANDLE_PIN(object) MONO_HANDLE_NEW (MonoObject, (object)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this only works for MonoObject
s, the macro name should probably have that at the end. I'm assuming that's the case since you didn't use it above for the MonoArray
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work for all objects, we might need to put casts into it in the future to make that happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think I'd rather just put the casts in and use for the MonoArray
in this PR then, but it's not a huge deal.
No description provided.