Bug 1359217 part 3 - Remove unused ErrorResult param from GetCssRulesInternal. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Fri, 09 Jun 2017 14:37:55 +1000
changeset 593001 561a4afe27245b2d914c275b1d27665553e954b3
parent 593000 a6f0a9743fc8b2f522012ad878e1fec39924b5fe
child 593002 4f7b9386ffcf562e1c94e9963cede8d7647c3c77
child 593003 5df032602714cc844b19d19c6b1ecb989f5555ab
child 593004 ec311516849b0fb8d2060c1b469e74b136623e10
child 593008 294911431d45834d300a750852bce55245049ed8
push id63571
push userxquan@mozilla.com
push dateTue, 13 Jun 2017 03:44:27 +0000
reviewersheycam
bugs1359217
milestone56.0a1
Bug 1359217 part 3 - Remove unused ErrorResult param from GetCssRulesInternal. r?heycam MozReview-Commit-ID: KxUN9cCkoZG
layout/style/CSSStyleSheet.cpp
layout/style/CSSStyleSheet.h
layout/style/ServoStyleSheet.cpp
layout/style/ServoStyleSheet.h
layout/style/StyleSheet.cpp
--- a/layout/style/CSSStyleSheet.cpp
+++ b/layout/style/CSSStyleSheet.cpp
@@ -665,17 +665,17 @@ CSSStyleSheet::RegisterNamespaceRule(css
 
 void
 CSSStyleSheet::SetScopeElement(dom::Element* aScopeElement)
 {
   mScopeElement = aScopeElement;
 }
 
 CSSRuleList*
-CSSStyleSheet::GetCssRulesInternal(ErrorResult& aRv)
+CSSStyleSheet::GetCssRulesInternal()
 {
   if (!mRuleCollection) {
     mRuleCollection = new CSSRuleListImpl(this);
   }
   return mRuleCollection;
 }
 
 uint32_t
--- a/layout/style/CSSStyleSheet.h
+++ b/layout/style/CSSStyleSheet.h
@@ -182,17 +182,17 @@ protected:
 
   // Unlink our inner, if needed, for cycle collection
   virtual void UnlinkInner() override;
   // Traverse our inner, if needed, for cycle collection
   virtual void TraverseInner(nsCycleCollectionTraversalCallback &) override;
 
 protected:
   // Internal methods which do not have security check and completeness check.
-  dom::CSSRuleList* GetCssRulesInternal(ErrorResult& aRv);
+  dom::CSSRuleList* GetCssRulesInternal();
   uint32_t InsertRuleInternal(const nsAString& aRule,
                               uint32_t aIndex, ErrorResult& aRv);
   void DeleteRuleInternal(uint32_t aIndex, ErrorResult& aRv);
   nsresult InsertRuleIntoGroupInternal(const nsAString& aRule,
                                        css::GroupRule* aGroup,
                                        uint32_t aIndex);
 
   void EnabledStateChangedInternal();
--- a/layout/style/ServoStyleSheet.cpp
+++ b/layout/style/ServoStyleSheet.cpp
@@ -276,17 +276,17 @@ ServoStyleSheet::Clone(StyleSheet* aClon
     static_cast<ServoStyleSheet*>(aCloneParent),
     aCloneOwnerRule,
     aCloneDocument,
     aCloneOwningNode);
   return clone.forget();
 }
 
 CSSRuleList*
-ServoStyleSheet::GetCssRulesInternal(ErrorResult& aRv)
+ServoStyleSheet::GetCssRulesInternal()
 {
   if (!mRuleList) {
     EnsureUniqueInner();
 
     RefPtr<ServoCssRules> rawRules =
       Servo_StyleSheet_GetRules(Inner()->mSheet).Consume();
     MOZ_ASSERT(rawRules);
     mRuleList = new ServoCSSRuleList(rawRules.forget(), this);
@@ -294,17 +294,17 @@ ServoStyleSheet::GetCssRulesInternal(Err
   return mRuleList;
 }
 
 uint32_t
 ServoStyleSheet::InsertRuleInternal(const nsAString& aRule,
                                     uint32_t aIndex, ErrorResult& aRv)
 {
   // Ensure mRuleList is constructed.
-  GetCssRulesInternal(aRv);
+  GetCssRulesInternal();
 
   mozAutoDocUpdate updateBatch(mDocument, UPDATE_STYLE, true);
   aRv = mRuleList->InsertRule(aRule, aIndex);
   if (aRv.Failed()) {
     return 0;
   }
   if (mDocument) {
     if (mRuleList->GetRuleType(aIndex) != css::Rule::IMPORT_RULE ||
@@ -316,17 +316,17 @@ ServoStyleSheet::InsertRuleInternal(cons
   }
   return aIndex;
 }
 
 void
 ServoStyleSheet::DeleteRuleInternal(uint32_t aIndex, ErrorResult& aRv)
 {
   // Ensure mRuleList is constructed.
-  GetCssRulesInternal(aRv);
+  GetCssRulesInternal();
   if (aIndex > mRuleList->Length()) {
     aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
     return;
   }
 
   mozAutoDocUpdate updateBatch(mDocument, UPDATE_STYLE, true);
   // 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
--- a/layout/style/ServoStyleSheet.h
+++ b/layout/style/ServoStyleSheet.h
@@ -122,17 +122,17 @@ protected:
   virtual ~ServoStyleSheet();
 
   ServoStyleSheetInner* Inner() const
   {
     return static_cast<ServoStyleSheetInner*>(mInner);
   }
 
   // Internal methods which do not have security check and completeness check.
-  dom::CSSRuleList* GetCssRulesInternal(ErrorResult& aRv);
+  dom::CSSRuleList* GetCssRulesInternal();
   uint32_t InsertRuleInternal(const nsAString& aRule,
                               uint32_t aIndex, ErrorResult& aRv);
   void DeleteRuleInternal(uint32_t aIndex, ErrorResult& aRv);
   nsresult InsertRuleIntoGroupInternal(const nsAString& aRule,
                                        css::GroupRule* aGroup,
                                        uint32_t aIndex);
 
   void EnabledStateChangedInternal() {}
--- a/layout/style/StyleSheet.cpp
+++ b/layout/style/StyleSheet.cpp
@@ -473,17 +473,17 @@ StyleSheet::AppendAllChildSheets(nsTArra
 
 dom::CSSRuleList*
 StyleSheet::GetCssRules(nsIPrincipal& aSubjectPrincipal,
                         ErrorResult& aRv)
 {
   if (!AreRulesAvailable(aSubjectPrincipal, aRv)) {
     return nullptr;
   }
-  FORWARD_INTERNAL(GetCssRulesInternal, (aRv))
+  FORWARD_INTERNAL(GetCssRulesInternal, ())
 }
 
 css::Rule*
 StyleSheet::GetDOMOwnerRule() const
 {
   return mOwnerRule;
 }