Bug 1352763 part 1 - Constify RawServoStyleSheet. r=heycam
authorXidorn Quan <me@upsuper.org>
Mon, 03 Apr 2017 16:19:32 +1000
changeset 350928 e2143aae5e80fe42cbd94fb08b5b324a2ad8316c
parent 350927 916a9cefd35ced8a0189e19139c72491c558d75f
child 350929 baffb5defe2f1627aeb76a91d4adbc1ac590a431
push id39989
push userxquan@mozilla.com
push dateMon, 03 Apr 2017 12:50:15 +0000
treeherderautoland@4487ef34d110 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1352763
milestone55.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
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.