Bug 690990. Don't assert that sheets are not modified when it would be just fine for them to be modified. r=peterv

This commit is contained in:
Boris Zbarsky 2011-10-03 15:11:59 -04:00
Родитель e55d93acb7
Коммит 0eec287021
3 изменённых файлов: 26 добавлений и 2 удалений

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

@ -1744,9 +1744,12 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
// Go through and deal with the whole linked list.
SheetLoadData* data = aLoadData;
while (data) {
NS_ABORT_IF_FALSE(!data->mSheet->IsModified(),
"should not get marked modified during parsing");
if (!data->mSheetAlreadyComplete) {
// If mSheetAlreadyComplete, then the sheet could well be modified between
// when we posted the async call to SheetComplete and now, since the sheet
// was page-accessible during that whole time.
NS_ABORT_IF_FALSE(!data->mSheet->IsModified(),
"should not get marked modified during parsing");
data->mSheet->SetComplete();
data->ScheduleLoadEventIfNeeded(aStatus);
}

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

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link id="e" href="data:text/css,.ref { background-color: green; }" rel="stylesheet">
<script>
function boom()
{
document.documentElement.appendChild(document.getElementById("e"));
document.styleSheets[0].cssRules[0];
// Remove reftest-wait async so we give the SheetComplete a chance to run
setTimeout(function() { document.documentElement.className = ""; }, 0);
}
</script>
<body onload="boom();"></body>
</html>

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

@ -72,3 +72,4 @@ load 611922-1.html
load 665209-1.html
asserts(2) load 671799-1.html
asserts(2) load 671799-2.html
load 690990-1.html