diff options
author | Josh Matthews <josh@joshmatthews.net> | 2021-05-14 17:13:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 17:13:17 -0400 |
commit | 7439401ff8bd49ef62165e8f4a5aaf026fbb0c3a (patch) | |
tree | 05f180c792222c4f61cd07225d74f3148fff9db5 /components/script/script_module.rs | |
parent | 5245f9ff272586875e1c1b849ae096228ea306a8 (diff) | |
download | servo-7439401ff8bd49ef62165e8f4a5aaf026fbb0c3a.tar.gz servo-7439401ff8bd49ef62165e8f4a5aaf026fbb0c3a.zip |
Don't hardcode string types.
Diffstat (limited to 'components/script/script_module.rs')
-rw-r--r-- | components/script/script_module.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/script_module.rs b/components/script/script_module.rs index dbd1431b5e4..4f1cfe1430a 100644 --- a/components/script/script_module.rs +++ b/components/script/script_module.rs @@ -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(), ) |