mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Don't hardcode string types.
This commit is contained in:
parent
5245f9ff27
commit
7439401ff8
1 changed files with 2 additions and 2 deletions
|
@ -1464,7 +1464,7 @@ unsafe extern "C" fn HostPopulateImportMeta(
|
|||
|
||||
rooted!(in(cx) let url_string = JS_NewStringCopyN(
|
||||
cx,
|
||||
base_url.as_str().as_ptr() as *const i8,
|
||||
base_url.as_str().as_ptr() as *const _,
|
||||
base_url.as_str().len()
|
||||
));
|
||||
|
||||
|
@ -1472,7 +1472,7 @@ unsafe extern "C" fn HostPopulateImportMeta(
|
|||
JS_DefineProperty4(
|
||||
cx,
|
||||
meta_object,
|
||||
"url\0".as_ptr() as *const i8,
|
||||
"url\0".as_ptr() as *const _,
|
||||
url_string.handle().into_handle(),
|
||||
JSPROP_ENUMERATE.into(),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue