Bug 1385193 - Set owner rule of child sheet properly. r=emilio
authorXidorn Quan <me@upsuper.org>
Fri, 28 Jul 2017 16:46:08 +1000
changeset 422729 38b225af571bfdb4fd5255293738311c069230ca
parent 422728 eb3f99693329f22e23c0c380c3869bb4d0567c94
child 422730 24d786a6e756ffc3d3f5ddadd5b367ce733ee211
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1385193
milestone56.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 1385193 - Set owner rule of child sheet properly. r=emilio MozReview-Commit-ID: GvQpA9wibIS
layout/style/ServoImportRule.cpp
--- a/layout/style/ServoImportRule.cpp
+++ b/layout/style/ServoImportRule.cpp
@@ -16,16 +16,17 @@ namespace mozilla {
 ServoImportRule::ServoImportRule(RefPtr<RawServoImportRule> aRawRule,
                                  uint32_t aLine, uint32_t aColumn)
   : CSSImportRule(aLine, aColumn)
   , mRawRule(Move(aRawRule))
 {
   const auto* sheet = Servo_ImportRule_GetSheet(mRawRule.get());
   MOZ_ASSERT(sheet);
   mChildSheet = const_cast<ServoStyleSheet*>(sheet);
+  mChildSheet->SetOwnerRule(this);
 }
 
 ServoImportRule::~ServoImportRule()
 {
   if (mChildSheet) {
     mChildSheet->SetOwnerRule(nullptr);
   }
 }