mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Support the updated spidermonkey bindings
This commit is contained in:
parent
32daa17d5c
commit
e733a7c46a
20 changed files with 234 additions and 223 deletions
|
@ -692,10 +692,10 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
let decoded = UTF_8.decode(&self.response.borrow(), DecoderTrap::Replace).unwrap().to_owned();
|
||||
let decoded: Vec<u16> = decoded.utf16_units().collect();
|
||||
unsafe {
|
||||
if JS_ParseJSON(cx,
|
||||
decoded.as_ptr() as *const i16,
|
||||
decoded.len() as u32,
|
||||
rval.handle_mut()) == 0 {
|
||||
if !JS_ParseJSON(cx,
|
||||
decoded.as_ptr(),
|
||||
decoded.len() as u32,
|
||||
rval.handle_mut()) {
|
||||
JS_ClearPendingException(cx);
|
||||
return NullValue();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue