mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Pass in string lengths to Gecko_GetAttrAsUTF8.
This commit is contained in:
parent
b29ae6383a
commit
603a19929c
2 changed files with 5 additions and 3 deletions
|
@ -344,7 +344,9 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
fn get_attr<'a>(&'a self, namespace: &Namespace, name: &Atom) -> Option<&'a str> {
|
||||
unsafe {
|
||||
let mut length: u32 = 0;
|
||||
let ptr = Gecko_GetAttrAsUTF8(self.element, namespace.0.as_ptr(), name.as_ptr(), &mut length);
|
||||
let ptr = Gecko_GetAttrAsUTF8(self.element,
|
||||
namespace.0.as_ptr(), namespace.0.len() as u32,
|
||||
name.as_ptr(), name.len() as u32, &mut length);
|
||||
reinterpret_string(ptr, length)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue