Bug 1405896 - Properly destroy OverflowContainersProperty() in NormalizeChildLists(). r=mats

mozilla::Unused is going to be removed in bug 1628542. We can cast the
return value of `TakeProperty` into void to suppress the warning.

In bug 1641085, we can add `DestroyOverflowContainersList` (similar to
DestroyOverflowList(), and audit the caller.

Differential Revision: https://phabricator.services.mozilla.com/D76981
This commit is contained in:
Ting-Yu Lin 2020-05-28 22:49:24 +00:00
Родитель 9aa6dd6524
Коммит f9501b14d9
3 изменённых файлов: 34 добавлений и 1 удалений

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

@ -0,0 +1,31 @@
<!-- a -->
<style>
* {
height: 0vmin;
display: grid
}
.class1 {
columns: 0px;
page-break-before: always;
grid-row-start: last
}
</style>
<script>
function jsfuzzer() {
try { htmlvar00045.replaceChild(htmlvar00013,htmlvar00045.childNodes[6]); } catch(e) { }
}
</script>
<body onload=jsfuzzer()>
<details id="htmlvar00013" class="class1"></details>
<details class="class1" open="">
<form>
<h6 id="htmlvar00045">
>
<link>
<content>
<embed>
>
#
K
</content>
<!-- a -->

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

@ -683,6 +683,7 @@ load 1401709.html
load 1401807.html
load 1404222-empty-shape.html
load 1405443.html
load 1405896.html
load 1406252-1.html
load 1415185.html
load 1416544.html

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

@ -1668,7 +1668,8 @@ void nsContainerFrame::NormalizeChildLists() {
f = next;
}
if (overflowContainers->IsEmpty()) {
RemoveProperty(OverflowContainersProperty());
(void)TakeProperty(OverflowContainersProperty());
overflowContainers->Delete(PresShell());
}
MergeSortedExcessOverflowContainers(moveToEOC);
}