Skip to content

Road to safe wrappers #641

@sagudev

Description

@sagudev

As part of #638 I am investigating what do we need to safe wrappers.

Ex: JS_StringEqualsAscii(cx: *mut JSContext, str_: *mut JSString, asciiBytes: *const ::std::os::raw::c_char, match_: *mut bool) -> bool
and safe and rusty version would be JS_StringEqualsAscii(cx: &JSContext, str_: JSStringWrapper, asciiBytes: &'static CStr, match_: &mut bool) -> Result<(), ()>.
While doing this could be somehow automated, we should still manually check if all assumptions are upheld in SM, so maybe it make sense to make this fully manual rather than trying to automate this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions