Make CSSStyleDeclaration setters rethrow errors instead of unwrapping and crashing.

This commit is contained in:
David Zbarsky 2015-08-10 00:32:32 -04:00
parent 166bb41baa
commit a3ee46fc9c
5 changed files with 153 additions and 138 deletions

View file

@ -44,8 +44,8 @@ macro_rules! css_properties(
fn $getter(self) -> DOMString {
self.GetPropertyValue($cssprop.to_owned())
}
fn $setter(self, value: DOMString) {
self.SetPropertyValue($cssprop.to_owned(), value).unwrap();
fn $setter(self, value: DOMString) -> ErrorResult {
self.SetPropertyValue($cssprop.to_owned(), value)
}
)*
);