mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Untry script
This commit is contained in:
parent
a5bb55790f
commit
7af5a7fd54
36 changed files with 199 additions and 199 deletions
|
@ -765,7 +765,7 @@ impl WindowMethods for Window {
|
|||
|
||||
// Step 1-2, 6-8.
|
||||
// TODO(#12717): Should implement the `transfer` argument.
|
||||
let data = try!(StructuredCloneData::write(cx, message));
|
||||
let data = StructuredCloneData::write(cx, message)?;
|
||||
|
||||
// Step 9.
|
||||
self.post_message(origin, data);
|
||||
|
@ -993,9 +993,9 @@ impl WindowMethods for Window {
|
|||
|
||||
// check-tidy: no specs after this line
|
||||
fn OpenURLInDefaultBrowser(&self, href: DOMString) -> ErrorResult {
|
||||
let url = try!(ServoUrl::parse(&href).map_err(|e| {
|
||||
let url = ServoUrl::parse(&href).map_err(|e| {
|
||||
Error::Type(format!("Couldn't parse URL: {}", e))
|
||||
}));
|
||||
})?;
|
||||
match open::that(url.as_str()) {
|
||||
Ok(_) => Ok(()),
|
||||
Err(e) => Err(Error::Type(format!("Couldn't open URL: {}", e))),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue