Bug 1352763 part 1 - Constify RawServoStyleSheet. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Mon, 03 Apr 2017 16:19:32 +1000
changeset 554965 988fb51056dde6756f3ada8a86bea87328e75114
parent 554964 6fc2b625c1307493fe4d60816897874a5077bfc5
child 554966 f5a5f000d6b2876a05f8aca918db85d7cd4241d3
push id52103
push userxquan@mozilla.com
push dateMon, 03 Apr 2017 11:21:25 +0000
reviewersheycam
bugs1352763
milestone55.0a1
Bug 1352763 part 1 - Constify RawServoStyleSheet. r?heycam MozReview-Commit-ID: IXWGobgV59f
layout/style/ServoStyleSheet.h
--- a/layout/style/ServoStyleSheet.h
+++ b/layout/style/ServoStyleSheet.h
@@ -27,17 +27,17 @@ class Loader;
 //
 
 struct ServoStyleSheetInner : public StyleSheetInfo
 {
   ServoStyleSheetInner(CORSMode aCORSMode,
                        ReferrerPolicy aReferrerPolicy,
                        const dom::SRIMetadata& aIntegrity);
 
-  RefPtr<RawServoStyleSheet> mSheet;
+  RefPtr<const RawServoStyleSheet> mSheet;
 };
 
 
 /**
  * CSS style sheet object that is a wrapper for a Servo Stylesheet.
  */
 class ServoStyleSheet : public StyleSheet
 {
@@ -61,20 +61,20 @@ public:
 
   /**
    * Called instead of ParseSheet to initialize the Servo stylesheet object
    * for a failed load. Either ParseSheet or LoadFailed must be called before
    * adding a ServoStyleSheet to a ServoStyleSet.
    */
   void LoadFailed();
 
-  RawServoStyleSheet* RawSheet() const {
+  const RawServoStyleSheet* RawSheet() const {
     return Inner()->mSheet;
   }
-  void SetSheetForImport(RawServoStyleSheet* aSheet) {
+  void SetSheetForImport(const RawServoStyleSheet* aSheet) {
     MOZ_ASSERT(!Inner()->mSheet);
     Inner()->mSheet = aSheet;
   }
 
   // WebIDL CSSStyleSheet API
   // Can't be inline because we can't include ImportRule here.  And can't be
   // called GetOwnerRule because that would be ambiguous with the ImportRule
   // version.