Closed Bug 257721 Opened 21 years ago Closed 21 years ago

nsPresShell::PostAttributeChange crashes

Categories

(Core :: Layout, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

(Keywords: crash)

Attachments

(1 file)

roc suggested I use this to set/clear the disabled attribute on scrollbars. Unfortunately it allocates some memory without constructing it.
Attached patch Proposed patchSplinter Review
Using placement new as suggested by brendan. Note that HandlePostedAttributeChanges already calls the destructor.
Comment on attachment 157663 [details] [diff] [review] Proposed patch Since it was you who asked me to use it in the first place ;-)
Attachment #157663 - Flags: superreview?(roc)
Attachment #157663 - Flags: review?(roc)
Comment on attachment 157663 [details] [diff] [review] Proposed patch How does this change anything? Or do you want nsAttributeChangeRequest to have a nontrivial constructor in the future?
Yes, I missed off some detail as usual... The constructor is nontrivial because the structure contains an nsAutoString.
Comment on attachment 157663 [details] [diff] [review] Proposed patch containing an nsAutoString is evil... we should change that to some other sort of string. but this patch is good.
Attachment #157663 - Flags: superreview?(roc)
Attachment #157663 - Flags: superreview+
Attachment #157663 - Flags: review?(roc)
Attachment #157663 - Flags: review+
Severity: normal → critical
Keywords: crash
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 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: