Skip to content

impl jsstr_to_string and latin1_to_string using &JSContext#718

Open
sagudev wants to merge 2 commits intoservo:mainfrom
sagudev:to_string_safe
Open

impl jsstr_to_string and latin1_to_string using &JSContext#718
sagudev wants to merge 2 commits intoservo:mainfrom
sagudev:to_string_safe

Conversation

@sagudev
Copy link
Member

@sagudev sagudev commented Mar 15, 2026

Testing: Change is covered by existing tests.

sagudev added 2 commits March 15, 2026 10:47
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
/// `String`.
///
/// Use [`latin1_to_string_safe`] if possible as this function will be eventually removed.
pub unsafe fn latin1_to_string(cx: *mut JSContext, s: NonNull<JSString>) -> String {
Copy link
Member

Choose a reason for hiding this comment

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

Should we perhaps add a deprecated annotation on it, or call it _legacy to make the comment about "will eventually be removed" more obvious at the usage sites?

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