mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1332704. Have ~nsDocument actually clear the self-pointer from _all_ its sheets, and reenable Rule::IsKnownLive bits that depends on that pointer being managed correctly. r=heycam
This commit is contained in:
parent
cc8f541aaa
commit
fde7c43bb1
@ -1487,6 +1487,11 @@ nsDocument::~nsDocument()
|
||||
for (StyleSheet* sheet : mStyleSheets) {
|
||||
sheet->ClearAssociatedDocument();
|
||||
}
|
||||
for (auto& sheets : mAdditionalSheets) {
|
||||
for (StyleSheet* sheet : sheets) {
|
||||
sheet->ClearAssociatedDocument();
|
||||
}
|
||||
}
|
||||
if (mAttrStyleSheet) {
|
||||
mAttrStyleSheet->SetOwningDocument(nullptr);
|
||||
}
|
||||
|
@ -83,10 +83,6 @@ Rule::IsKnownLive() const
|
||||
return true;
|
||||
}
|
||||
|
||||
#if 1
|
||||
return false;
|
||||
#else
|
||||
// Disabled pending bug 1332704 getting resolved for now.
|
||||
StyleSheet* sheet = GetStyleSheet();
|
||||
if (!sheet) {
|
||||
return false;
|
||||
@ -98,7 +94,6 @@ Rule::IsKnownLive() const
|
||||
|
||||
return nsCCUncollectableMarker::InGeneration(
|
||||
sheet->GetAssociatedDocument()->GetMarkedCCGeneration());
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(Rule)
|
||||
|
Loading…
Reference in New Issue
Block a user