diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-04-07 17:05:59 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-04-07 17:05:59 +0200 |
commit | 9ada80e4c0d7c9c372ee31c0bb4abd491d7a1740 (patch) | |
tree | c3243ba57b0151e057351c0d6c999b16c8e9ce24 /src/components/script/script_task.rs | |
parent | 86c83f7bfc2c748047dbd9b2d4b788e77714c980 (diff) | |
download | servo-9ada80e4c0d7c9c372ee31c0bb4abd491d7a1740.tar.gz servo-9ada80e4c0d7c9c372ee31c0bb4abd491d7a1740.zip |
Handle an exception from cx.evaluate_script more gracefully.
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r-- | src/components/script/script_task.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs index c1c3a717f1a..9e001aa7fff 100644 --- a/src/components/script/script_task.rs +++ b/src/components/script/script_task.rs @@ -878,10 +878,10 @@ impl ScriptTask { }; //FIXME: this should have some kind of error handling, or explicitly // drop an exception on the floor. - assert!(cx.evaluate_script(global_obj, - file.data.clone(), - file.url.to_str(), - 1).is_ok()); + match cx.evaluate_script(global_obj, file.data.clone(), file.url.to_str(), 1) { + Ok(_) => (), + Err(_) => println!("evaluate_script failed") + } }); } |