mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
script: Use the new C string literal in the DOM bindings (#32741)
* simple conversion to cstrings using as_ptr() Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> * replaced byte strings with c strings using new helper functions Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> * changed &[u8] type parameters to &CStr Signed-off-by: Bum Kim <bumcrystlbum@gmail.com> --------- Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
This commit is contained in:
parent
3e163bfcdb
commit
c6cb7ee981
6 changed files with 60 additions and 63 deletions
|
@ -1469,7 +1469,7 @@ unsafe extern "C" fn HostPopulateImportMeta(
|
|||
JS_DefineProperty4(
|
||||
cx,
|
||||
meta_object,
|
||||
"url\0".as_ptr() as *const _,
|
||||
c"url".as_ptr(),
|
||||
url_string.handle().into_handle(),
|
||||
JSPROP_ENUMERATE.into(),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue