Support the updated spidermonkey bindings

This commit is contained in:
Michael Wu 2015-09-23 16:53:03 -04:00
parent 32daa17d5c
commit e733a7c46a
20 changed files with 234 additions and 223 deletions

View file

@ -31,7 +31,7 @@ impl StructuredCloneData {
ptr::null(), ptr::null_mut(),
HandleValue::undefined())
};
if result == 0 {
if !result {
unsafe { JS_ClearPendingException(cx); }
return Err(Error::DataClone);
}
@ -49,7 +49,7 @@ impl StructuredCloneData {
assert!(JS_ReadStructuredClone(
global.get_cx(), self.data, self.nbytes,
JS_STRUCTURED_CLONE_VERSION, rval,
ptr::null(), ptr::null_mut()) != 0);
ptr::null(), ptr::null_mut()));
}
}
}