Closed Bug 334430 Opened 19 years ago Closed 19 years ago

[FIX]nsXBLService::LoadBindings causes reentry into frame construction

Categories

(Core :: XBL, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: dbaron, Assigned: bzbarsky)

References

Details

Attachments

(2 files, 1 obsolete file)

nsXBLService::LoadBindings, called from ConstructFrameInternal (which can be arbitrarily deep within a frame construction entry point, unlike the calls to ProcessAttachedQueue which are always made from the entry point), sometimes causes reentry into frame construction. Because of this, I had to make one of the assertions added for bug 310985 a warning instead. Stack coming shortly.
Comment on attachment 218792 [details] stack of first assertion opening Firefox options dialog Oops, sorry, that stack was actually a different bug; I didn't look closely enough.
Attachment #218792 - Attachment is obsolete: true
I filed bug 334450 on the first stack.
Severity: normal → critical
So why are we passing PR_TRUE for aNotify here? I'd think we want to pass PR_FALSE. I'm looking, in particular, at: textContent->SetText(value, PR_TRUE); realElement->AppendChildTo(textContent, PR_TRUE); This looks like it's handling xbl:inherits="xbl:text=foo" and xbl:inherits="value=foo" (the latter only for <xul:html> nodes). Is there something we should test to make sure it doesn't break if we're going to twiddle this code?
Severity: critical → normal
I think checkboxes and radiobuttons use xbl:text=label although offhand I don't know of an example of changing a checkbox or radio button label. Out of interest, whose job would it be to create the frame(s) for the new text?
The frame constructor's. Changing is a different thing; we're lookin at nsXBLPrototypeBinding::SetInitialAttributes here. There are no frames anywhere in sight for this stuff.
I think we should forbid nsIDocumentObservers to cause mutations to the DOM since that can cause a whole set of issues similar to the ones we have with mutation events. A simple solution would be to wait until EndUpdate is called (enough times) and then perform the mutation.
That's a separate issue from this bug. But yeah, that would be nice....
Attached patch Proposed patchSplinter Review
Assignee: general → bzbarsky
Status: NEW → ASSIGNED
Attachment #218893 - Flags: superreview?(bugmail)
Attachment #218893 - Flags: review?(bugmail)
Priority: -- → P1
Summary: nsXBLService::LoadBindings causes reentry into frame construction → [FIX]nsXBLService::LoadBindings causes reentry into frame construction
Target Milestone: --- → mozilla1.9alpha
So don't we want to use PR_TRUE there? To get layout to update.
What layout? This is just-installed anonymous content for a binding we're still setting up. There is no layout. We do use PR_TRUE in AttributeChanged, and we should file a separate bug on making that not suck.
Comment on attachment 218893 [details] [diff] [review] Proposed patch ah, ok. r/sr=sicking
Attachment #218893 - Flags: superreview?(bugmail)
Attachment #218893 - Flags: superreview+
Attachment #218893 - Flags: review?(bugmail)
Attachment #218893 - Flags: review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: