-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
fix(cli/napi): handle all property variants in napi_define_properties #17680
Conversation
method: None, | ||
getter: None, | ||
setter: None, | ||
data: ptr::null_mut(), | ||
attributes: enumerable, | ||
value: number, | ||
}, | ||
// TODO(@littledivy): Fix this. |
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.
What's not working here?
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.
name
field isn't handled correctly. #17712
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.
LGTM
@@ -27,7 +27,7 @@ pub mod typedarray; | |||
#[macro_export] | |||
macro_rules! cstr { | |||
($s: literal) => {{ | |||
std::ffi::CString::new($s).unwrap().as_ptr() | |||
std::ffi::CString::new($s).unwrap().into_raw() |
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.
the allocated cstring wasn't leaked so the pointer from .as_ptr
was dangling. into_raw
leaks it
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.
Good catch!
Fixes #17509
This fixes the bug that blocked loading
fsevents
in Deno.