Closed Bug 700116 Opened 8 years ago Closed 8 years ago

ABORT: should not get marked modified during parsing: '!data->mSheet->IsModified()'


(Core :: CSS Parsing and Computation, defect, P2, critical)




Tracking Status
firefox8 --- affected
firefox9 --- affected
firefox10 --- affected


(Reporter: bc, Assigned: bzbarsky)


(Blocks 1 open bug, )


(Keywords: assertion)


(2 files)

2. ABORT: should not get marked modified during parsing: '!data->mSheet->IsModified()', file /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp, line 1754

0  0x00043ef4 in TouchBadMemory () at /work/mozilla/builds/nightly/mozilla/memory/mozalloc/mozalloc_abort.cpp:66
#1  0x00043f4f in mozalloc_abort (msg=0xbfffc750 "###!!! ABORT: should not get marked modified during parsing: '!data->mSheet->IsModified()', file /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp, line 1754") at /work/mozilla/builds/nightly/mozilla/memory/mozalloc/mozalloc_abort.cpp:87
#2  0x06b351dd in Abort (aMsg=Could not find the frame base for "Abort(char const*)".
) at /work/mozilla/builds/nightly/mozilla/xpcom/base/nsDebugImpl.cpp:388
#3  0x06b35786 in NS_DebugBreak_P (aSeverity=3, aStr=0x73d1d7c "should not get marked modified during parsing", aExpr=0x73d1d60 "!data->mSheet->IsModified()", aFile=0x73d1050 "/work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp", aLine=1754) at /work/mozilla/builds/nightly/mozilla/xpcom/base/nsDebugImpl.cpp:345
#4  0x057839f5 in mozilla::css::Loader::DoSheetComplete (this=0x23a8eae0, aLoadData=0x25c60710, aStatus=0, aDatasToNotify=@0xbfffcc58) at /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp:1753
#5  0x05783d49 in mozilla::css::Loader::SheetComplete (this=0x23a8eae0, aLoadData=0x25c60710, aStatus=0) at /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp:1683
#6  0x05784610 in mozilla::css::Loader::ParseSheet (this=0x23a8eae0, aInput=@0x25ca4334, aLoadData=0x25c60710, aCompleted=@0xbfffce2b) at /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp:1658
#7  0x05786502 in mozilla::css::SheetLoadData::OnStreamComplete (this=0x25c60710, aLoader=0x25ca4300, aContext=0x0, aStatus=0, aBuffer=@0x25ca4334) at /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp:991

Nightly, Aurora, Beta - Linux, Mac, Windows
The real issue is an assertion much earlier:

###!!! ASSERTION: CreateSheet lied about the state: 'existingData', file ../../../mozilla/layout/style/Loader.cpp, line 1486

The rest follows.
Assignee: nobody → bzbarsky
Attached file Minimal testcase
At least for the asserts.  The problem is that IsAlternate() on the second title="x" stylesheet makes that title non-alternate, thus kicking off the load of the first title="x" stylesheet.
And in particular, IsAlternate calls SetHeaderData on the document which calls SetPreferredSheet on the loader, which messes with the mPendingDatas hashtable.

We need to either make some part of that async or deal with the table mutation.
Priority: -- → P2
Whiteboard: [need review]
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla10
Backed out for retest failures on Windows:
REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/test/build/reftest/tests/content/test/reftest/xml-stylesheet/css_relative_href_also_external.xml | assertion count 1 is more than expected 0 assertions
REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/test/build/reftest/tests/content/test/reftest/xml-stylesheet/css_relative_href_also_external_override.xml | assertion count 1 is more than expected 0 assertions 
Target Milestone: mozilla10 → ---
Ah, bah.  I failed to set *aIsAlternate on the various CSS loader methods.  Fixing that. with that fixed
Target Milestone: --- → mozilla11
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.