author | Blito <pabloarubi@gmail.com> |
Thu, 18 Jul 2019 17:51:39 +0000 | |
changeset 483436 | 13a4951a9f46ab6b9d06fddcc4140d27094226dc |
parent 483435 | 1c1e27b9d73bf90d0f785198f52b967c7c8fd08d |
child 483437 | c949fbdda08f81aef75b07a0306dee3f2fe8e747 |
push id | 90382 |
push user | ealvarez@mozilla.com |
push date | Thu, 18 Jul 2019 22:11:38 +0000 |
treeherder | autoland@13a4951a9f46 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | emilio |
bugs | 1541861 |
milestone | 70.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/style/StyleSheet.cpp +++ b/layout/style/StyleSheet.cpp @@ -1187,17 +1187,22 @@ uint32_t StyleSheet::InsertRuleInternal( } void StyleSheet::DeleteRuleInternal(uint32_t aIndex, ErrorResult& aRv) { MOZ_ASSERT(!IsReadOnly()); // Ensure mRuleList is constructed. GetCssRulesInternal(); if (aIndex >= mRuleList->Length()) { - aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR); + aRv.ThrowDOMException( + NS_ERROR_DOM_INDEX_SIZE_ERR, + nsPrintfCString( + "Cannot delete rule at index %u" + " because the number of rules is only %u", + aIndex, mRuleList->Length())); return; } // Hold a strong ref to the rule so it doesn't die when we remove it // from the list. XXX We may not want to hold it if stylesheet change // event is not enabled. RefPtr<css::Rule> rule = mRuleList->GetRule(aIndex); aRv = mRuleList->DeleteRule(aIndex);