From 11b5bde3e222700aed176ad0fff5615b847e362d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 3 Oct 2011 15:11:59 -0400 Subject: [PATCH] Bug 690990. Don't assert that sheets are not modified when it would be just fine for them to be modified. r=peterv --- layout/style/Loader.cpp | 7 +++++-- layout/style/crashtests/690990-1.html | 20 ++++++++++++++++++++ layout/style/crashtests/crashtests.list | 1 + 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 layout/style/crashtests/690990-1.html diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 2e2cc0740efa..9a82c43fa578 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -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); } diff --git a/layout/style/crashtests/690990-1.html b/layout/style/crashtests/690990-1.html new file mode 100644 index 000000000000..19520e4f9074 --- /dev/null +++ b/layout/style/crashtests/690990-1.html @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/layout/style/crashtests/crashtests.list b/layout/style/crashtests/crashtests.list index eab27482b1c4..f68b0910047b 100644 --- a/layout/style/crashtests/crashtests.list +++ b/layout/style/crashtests/crashtests.list @@ -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