mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Handle an exception from cx.evaluate_script more gracefully.
This commit is contained in:
parent
86c83f7bfc
commit
9ada80e4c0
1 changed files with 4 additions and 4 deletions
|
@ -878,10 +878,10 @@ impl ScriptTask {
|
||||||
};
|
};
|
||||||
//FIXME: this should have some kind of error handling, or explicitly
|
//FIXME: this should have some kind of error handling, or explicitly
|
||||||
// drop an exception on the floor.
|
// drop an exception on the floor.
|
||||||
assert!(cx.evaluate_script(global_obj,
|
match cx.evaluate_script(global_obj, file.data.clone(), file.url.to_str(), 1) {
|
||||||
file.data.clone(),
|
Ok(_) => (),
|
||||||
file.url.to_str(),
|
Err(_) => println!("evaluate_script failed")
|
||||||
1).is_ok());
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue