Closed Bug 257694 Opened 20 years ago Closed 20 years ago

[FIXr]Enumeration of pending restyles can cause posting of restyle events

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8alpha4

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Some restyles can cause frame reconstructs, whicg may in some cases lead to
restyle events.  We want to make sure to not add entries to the hashtable while
it's being enumerated; see
http://lxr.mozilla.org/seamonkey/source/xpcom/ds/pldhash.h#544

Current plan:  when processing pending restyles, first make a list (on the
stack) of all the restyles to be processed, then clear the hashtable.  Then
process the list we built up.  This will keep us from modifying the hashtable
while we enumerate it.  That should also fix bug 256242, since by the time we're
processing the restyle flushing restyles again won't try to process it again.
Priority: -- → P1
Target Milestone: --- → mozilla1.8alpha4
Attached patch Something like this (deleted) — Splinter Review
Comment on attachment 158556 [details] [diff] [review]
Something like this

I went with heap-allocation of the array because the hashtable can end up
containing several hundred elements on some pages (esp. "DHTML" ones).
Attachment #158556 - Flags: superreview?(dbaron)
Attachment #158556 - Flags: review?(dbaron)
Summary: Enumeration of pending restyles can cause posting of restyle events → [FIX]Enumeration of pending restyles can cause posting of restyle events
Comment on attachment 158556 [details] [diff] [review]
Something like this

r+sr=dbaron (I'm assuming the big chunk of code was just moved)
Attachment #158556 - Flags: superreview?(dbaron)
Attachment #158556 - Flags: superreview+
Attachment #158556 - Flags: review?(dbaron)
Attachment #158556 - Flags: review+
Yeah, the big chunk was just moved.
Summary: [FIX]Enumeration of pending restyles can cause posting of restyle events → [FIXr]Enumeration of pending restyles can cause posting of restyle events
Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: