diff options
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r-- | components/script/dom/window.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index ed50d073175..e81efa4a77c 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -820,7 +820,7 @@ impl<'a, T: Reflectable> ScriptHelpers for &'a T { let cx = global.r().get_cx(); let _ar = JSAutoRequest::new(cx); let globalhandle = global.r().reflector().get_jsobject(); - let code: Vec<u16> = code.utf16_units().collect(); + let code: Vec<u16> = code.encode_utf16().collect(); let filename = CString::new(filename).unwrap(); let _ac = JSAutoCompartment::new(cx, globalhandle.get()); |