aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/utils.rs')
-rw-r--r--components/script/dom/bindings/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs
index adfd9017037..402b60fc2b6 100644
--- a/components/script/dom/bindings/utils.rs
+++ b/components/script/dom/bindings/utils.rs
@@ -451,7 +451,7 @@ pub unsafe extern "C" fn resolve_global(
let mut length = 0;
let ptr = JS_GetLatin1StringCharsAndLength(cx, ptr::null(), string, &mut length);
assert!(!ptr.is_null());
- let bytes = slice::from_raw_parts(ptr, length as usize);
+ let bytes = slice::from_raw_parts(ptr, length);
if let Some(init_fun) = InterfaceObjectMap::MAP.get(bytes) {
init_fun(SafeJSContext::from_ptr(cx), Handle::from_raw(obj));