Closed Bug 448161 Opened 17 years ago Closed 17 years ago

[FIX]"ASSERTION: Must have document!" and crash [@ nsStyleUtil::IsHTMLLink]

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(5 keywords)

Crash Data

Attachments

(2 files)

Attached file testcase
The testcase triggers a crash [@ nsStyleUtil::IsHTMLLink]. Before the crash, I see an assertion that was added in bug 416317: ###!!! ASSERTION: Must have document!: 'aContent->GetCurrentDoc()', file layout/style/nsStyleUtil.cpp, line 470 I think the crash is also a regression, because I'm seeing it fairly often today and don't remember seeing it earlier.
See http://forums.mozillazine.org/viewtopic.php?f=23&t=765915&sid=093e4fef288ab82ae44017c2c2d7c7da This is probably also the reason why http://code.google.com/apis/checkout/developer/google_checkout_html_api.html crashes. http://crash-stats.mozilla.com/report/index/aba903dc-5b6d-11dd-98b0-001a4bd43e5c?p=1 0 xul.dll xul.dll@0x27cd05 1 xul.dll RuleProcessorData::RuleProcessorData layout/style/nsCSSRuleProcessor.cpp:887 2 xul.dll ElementRuleProcessorData::ElementRuleProcessorData layout/style/nsIStyleRuleProcessor.h:163 3 xul.dll nsStyleSet::ResolveStyleFor layout/style/nsStyleSet.cpp:661 4 xul.dll nsInspectorCSSUtils::GetStyleContextForContent layout/style/nsInspectorCSSUtils.cpp:158 5 xul.dll xul.dll@0x307018 6 xul.dll NS_InvokeByIndex_P xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp:101 7 xul.dll XPCWrappedNative::CallMethod js/src/xpconnect/src/xpcwrappednative.cpp:2393
Perhaps a regression from bug 332148, somehow?
The OS should be changed to all. I'm using Vista and I get the same crashes.
OS: Mac OS X → All
Hardware: PC → All
I'm hitting this a lot while browsing Facebook.
Flags: blocking1.9.1?
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #331769 - Flags: superreview?(dbaron)
Attachment #331769 - Flags: review?(dbaron)
Summary: "ASSERTION: Must have document!" and crash [@ nsStyleUtil::IsHTMLLink] → [FIX]"ASSERTION: Must have document!" and crash [@ nsStyleUtil::IsHTMLLink]
Note that the original testcase basically shows bug 399791 in addition to this bug.
Comment on attachment 331769 [details] [diff] [review] Don't crash when getting computed style on a link not in the document r+sr=dbaron
Attachment #331769 - Flags: superreview?(dbaron)
Attachment #331769 - Flags: superreview+
Attachment #331769 - Flags: review?(dbaron)
Attachment #331769 - Flags: review+
Blocks: 448608
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Flags: blocking1.9.1? → blocking1.9.1+
Seeing that there haven't been any duplicate sightings for this issue for 7 months, I'm going to go ahead and verify this unless someone has an issue with that.
Status: RESOLVED → VERIFIED
Crash Signature: [@ nsStyleUtil::IsHTMLLink]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: