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.
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) -> booland 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.