зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
e55d93acb7
Коммит
0eec287021
|
@ -1744,9 +1744,12 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
|
||||||
// Go through and deal with the whole linked list.
|
// Go through and deal with the whole linked list.
|
||||||
SheetLoadData* data = aLoadData;
|
SheetLoadData* data = aLoadData;
|
||||||
while (data) {
|
while (data) {
|
||||||
NS_ABORT_IF_FALSE(!data->mSheet->IsModified(),
|
|
||||||
"should not get marked modified during parsing");
|
|
||||||
if (!data->mSheetAlreadyComplete) {
|
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->mSheet->SetComplete();
|
||||||
data->ScheduleLoadEventIfNeeded(aStatus);
|
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
|
load 665209-1.html
|
||||||
asserts(2) load 671799-1.html
|
asserts(2) load 671799-1.html
|
||||||
asserts(2) load 671799-2.html
|
asserts(2) load 671799-2.html
|
||||||
|
load 690990-1.html
|
||||||
|
|
Загрузка…
Ссылка в новой задаче