Bug 1719963 - Restore EnsureUniqueInner() call for now. r=jfkthame

This effectively reverts the behavior to the one before bug 1711437
(making the CC setup sound again), but without a big backout.

Fixing the CC setup of @import rules properly is a bit more involved
than what I anticipated and I don't want to have DevTools folks blocked
for too long, nor have this crash in-tree for too long either.

Differential Revision: https://phabricator.services.mozilla.com/D122819
This commit is contained in:
Emilio Cobos Álvarez 2021-08-17 09:26:29 +00:00
Родитель 5854752a69
Коммит a240c81d43
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -1385,6 +1385,10 @@ already_AddRefed<StyleSheet> StyleSheet::CloneAdoptedSheet(
ServoCSSRuleList* StyleSheet::GetCssRulesInternal() { ServoCSSRuleList* StyleSheet::GetCssRulesInternal() {
if (!mRuleList) { if (!mRuleList) {
// TODO(emilio): This should go away, but we need to fix the CC setup for
// @import rules first, see bug 1719963.
EnsureUniqueInner();
RefPtr<ServoCssRules> rawRules = RefPtr<ServoCssRules> rawRules =
Servo_StyleSheet_GetRules(Inner().mContents).Consume(); Servo_StyleSheet_GetRules(Inner().mContents).Consume();
MOZ_ASSERT(rawRules); MOZ_ASSERT(rawRules);