diff --git a/content/html/style/src/nsDOMCSSAttrDeclaration.cpp b/content/html/style/src/nsDOMCSSAttrDeclaration.cpp
index df88034c175..68f3f7c16a9 100644
--- a/content/html/style/src/nsDOMCSSAttrDeclaration.cpp
+++ b/content/html/style/src/nsDOMCSSAttrDeclaration.cpp
@@ -83,6 +83,11 @@ nsDOMCSSAttributeDeclaration::RemoveProperty(const nsAString& aPropertyName,
if (NS_SUCCEEDED(rv)) {
rv = SetCSSDeclaration(decl, PR_TRUE);
+ } else {
+ // RemoveProperty will throw in all sorts of situations -- eg if
+ // the property is a shorthand one. Do not propagate its return
+ // value to callers.
+ rv = NS_OK;
}
}
diff --git a/layout/style/nsDOMCSSAttrDeclaration.cpp b/layout/style/nsDOMCSSAttrDeclaration.cpp
index df88034c175..68f3f7c16a9 100644
--- a/layout/style/nsDOMCSSAttrDeclaration.cpp
+++ b/layout/style/nsDOMCSSAttrDeclaration.cpp
@@ -83,6 +83,11 @@ nsDOMCSSAttributeDeclaration::RemoveProperty(const nsAString& aPropertyName,
if (NS_SUCCEEDED(rv)) {
rv = SetCSSDeclaration(decl, PR_TRUE);
+ } else {
+ // RemoveProperty will throw in all sorts of situations -- eg if
+ // the property is a shorthand one. Do not propagate its return
+ // value to callers.
+ rv = NS_OK;
}
}