mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Untry script
This commit is contained in:
parent
a5bb55790f
commit
7af5a7fd54
36 changed files with 199 additions and 199 deletions
|
@ -390,7 +390,7 @@ pub unsafe fn private_from_proto_check<F>(mut obj: *mut JSObject,
|
|||
-> Result<*const libc::c_void, ()>
|
||||
where F: Fn(&'static DOMClass) -> bool
|
||||
{
|
||||
let dom_class = try!(get_dom_class(obj).or_else(|_| {
|
||||
let dom_class = get_dom_class(obj).or_else(|_| {
|
||||
if IsWrapper(obj) {
|
||||
trace!("found wrapper");
|
||||
obj = UnwrapObject(obj, /* stopAtWindowProxy = */ 0);
|
||||
|
@ -406,7 +406,7 @@ pub unsafe fn private_from_proto_check<F>(mut obj: *mut JSObject,
|
|||
trace!("not a dom wrapper");
|
||||
Err(())
|
||||
}
|
||||
}));
|
||||
})?;
|
||||
|
||||
if proto_check(dom_class) {
|
||||
trace!("good prototype");
|
||||
|
|
|
@ -69,7 +69,7 @@ impl<T, C> FromJSValConvertible for MozMap<T>
|
|||
return Err(());
|
||||
}
|
||||
|
||||
let property = match try!(T::from_jsval(cx, property.handle(), config.clone())) {
|
||||
let property = match T::from_jsval(cx, property.handle(), config.clone())? {
|
||||
ConversionResult::Success(property) => property,
|
||||
ConversionResult::Failure(message) => return Ok(ConversionResult::Failure(message)),
|
||||
};
|
||||
|
|
|
@ -114,7 +114,7 @@ unsafe fn write_blob(blob: Root<Blob>,
|
|||
w: *mut JSStructuredCloneWriter)
|
||||
-> Result<(), ()> {
|
||||
let structured_writer = StructuredCloneWriter { w: w };
|
||||
let blob_vec = try!(blob.get_bytes());
|
||||
let blob_vec = blob.get_bytes()?;
|
||||
assert!(JS_WriteUint32Pair(w, StructuredCloneTags::DomBlob as u32, 0));
|
||||
structured_writer.write_slice(&blob_vec);
|
||||
structured_writer.write_str(&blob.type_string());
|
||||
|
|
|
@ -32,7 +32,7 @@ pub fn validate_and_extract(namespace: Option<DOMString>,
|
|||
let namespace = namespace_from_domstring(namespace);
|
||||
|
||||
// Step 2.
|
||||
try!(validate_qualified_name(qualified_name));
|
||||
validate_qualified_name(qualified_name)?;
|
||||
|
||||
let colon = ':';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue