mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-26 22:32:12 +00:00
Minor doc fix
This commit is contained in:
parent
2405fad319
commit
3177fa9edc
@ -129,8 +129,8 @@ cfg_if! {
|
|||||||
if #[cfg(feature = "enable-interning")] {
|
if #[cfg(feature = "enable-interning")] {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn get_cached_str(x: &str) -> Option<WasmSlice> {
|
fn get_cached_str(x: &str) -> Option<WasmSlice> {
|
||||||
// This is safe because the JsValue is immediately converted into a JS string,
|
// This is safe because the JsValue is immediately looked up in the heap and
|
||||||
// so use-after-free cannot occur.
|
// then returned, so use-after-free cannot occur.
|
||||||
//
|
//
|
||||||
// This uses 0 for the ptr as an indication that it is a JsValue and not a str.
|
// This uses 0 for the ptr as an indication that it is a JsValue and not a str.
|
||||||
crate::cache::intern::unsafe_get_str(x).map(|x| WasmSlice { ptr: 0, len: x })
|
crate::cache::intern::unsafe_get_str(x).map(|x| WasmSlice { ptr: 0, len: x })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user