Open Bug 724466 Opened 13 years ago Updated 3 years ago

Allow fetching string value of nsAttrValue when type is eString OR eAtom

Categories

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

defect

Tracking

()

People

(Reporter: birtles, Unassigned)

References

Details

In patch 3 from bug 629200 we have the following piece of code nsXULElement::AfterSetAttr: > + if (aValue->Type() == nsAttrValue::eString) { > + AddScriptEventListener(aName, aValue->GetStringValue(), defer); > + } else { > + nsAutoString body; > + aValue->ToString(body); > + AddScriptEventListener(aName, body, defer); > + } The second branch is because aValue may be of type nsAttrValue::eAtom. There should be a way to fetch a string from an nsAttrValue for the case when it is either type eString or eAtom without having to go through ToString (e.g. by using nsCheapString). In doing so, we should fix the above piece of code in nsXULElement.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.