diff --git a/layout/style/nsStyleContext.h b/layout/style/nsStyleContext.h index ef200d6c9b8c..dfd248593bf5 100644 --- a/layout/style/nsStyleContext.h +++ b/layout/style/nsStyleContext.h @@ -163,7 +163,15 @@ public: #endif } - nsStyleContext* GetParent() const { return mParent; } + nsStyleContext* GetParent() const { + MOZ_ASSERT(mSource.IsGeckoRuleNode(), + "This should be used only in Gecko-backed style system!"); + return mParent; + } + + nsStyleContext* GetParentAllowServo() const { + return mParent; + } nsIAtom* GetPseudo() const { return mPseudoTag; } mozilla::CSSPseudoElementType GetPseudoType() const {