Closed Bug 406916 Opened 17 years ago Closed 17 years ago

nsXULElement::AfterSetAttr notifies when it shouldn't

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta4

People

(Reporter: bzbarsky, Assigned: peterv)

References

Details

(Keywords: regression)

Attachments

(1 file)

nsXULElement::AfterSetAttr seems to have the fllowing code: // handle :read-only/:read-write nsIDocument *document = GetCurrentDoc(); if (aName == nsGkAtoms::readonly && document) { mozAutoDocUpdate upd(document, UPDATE_CONTENT_STATE, PR_TRUE); document->ContentStatesChanged(this, nsnull, NS_EVENT_STATE_MOZ_READONLY | NS_EVENT_STATE_MOZ_READWRITE); } I'm a little confused by why it's needed, since nsGenericElement::SetAttr handles state changes happening during the attr set. If it _is_ needed, should it really be notifying even if aNotify is false? Note that removing the "readonly" attribute is not handled, by the way...
Flags: blocking1.9?
bz can you suggest a priority?
I'd say P3.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Peter, you added this code. Actually, the fact that it notifies when aNotify is false could actually probably cause exploitable crashes, so upping priority of that part.
Assignee: nobody → peterv
Priority: P3 → P2
Attached patch v1Splinter Review
Yeah, that seems like a mistake.
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9beta4
Attachment #302616 - Flags: superreview?(jonas)
Attachment #302616 - Flags: review?(jonas)
Attachment #302616 - Flags: superreview?(jonas)
Attachment #302616 - Flags: superreview+
Attachment #302616 - Flags: review?(jonas)
Attachment #302616 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: