mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Replace null-byte terminated string literals with C-string literals (#32716)
* simple conversion from byte string to c-string Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> * convert byte strings to c-strings to c_char ptr Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> --------- Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
This commit is contained in:
parent
59d0f1fe1a
commit
141a594e23
6 changed files with 29 additions and 29 deletions
|
@ -697,7 +697,7 @@ unsafe fn append_cross_origin_allowlisted_prop_keys(
|
|||
) {
|
||||
rooted!(in(*cx) let mut id: jsid);
|
||||
|
||||
let jsstring = JS_AtomizeAndPinString(*cx, b"then\0".as_ptr() as *const c_char);
|
||||
let jsstring = JS_AtomizeAndPinString(*cx, c"then".as_ptr());
|
||||
rooted!(in(*cx) let rooted = jsstring);
|
||||
RUST_INTERNED_STRING_TO_JSID(*cx, rooted.handle().get(), id.handle_mut());
|
||||
AppendToIdVector(props, id.handle());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue