diff options
author | Michael Wu <mwu@mozilla.com> | 2015-09-23 16:53:03 -0400 |
---|---|---|
committer | Michael Wu <mwu@mozilla.com> | 2015-10-14 15:30:52 -0400 |
commit | e733a7c46a5d14a1be219e76136cdcb2d678d33a (patch) | |
tree | 7a50317a6cfa109eb3a7049add9ad87597dac55e /components/script/dom/xmlhttprequest.rs | |
parent | 32daa17d5cbcad02db0713e21e52410cdc60480e (diff) | |
download | servo-e733a7c46a5d14a1be219e76136cdcb2d678d33a.tar.gz servo-e733a7c46a5d14a1be219e76136cdcb2d678d33a.zip |
Support the updated spidermonkey bindings
Diffstat (limited to 'components/script/dom/xmlhttprequest.rs')
-rw-r--r-- | components/script/dom/xmlhttprequest.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index cbe1551f339..fb9a53ee5e8 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -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(); } |