Closed Bug 241272 Opened 21 years ago Closed 21 years ago

Various nsAttrValue methods don't reset properly

Categories

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

defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: sicking)

Details

(Keywords: fixed1.7, memory-leak)

Attachments

(1 file)

From my last mail to sicking (the part he wrote is the quoted part): --------------------------------------------------- Jonas Sicking wrote: > Oh, actually, i have a theory. ParseSpecialIntValue doesn't Reset() the old > value but rather just overwrites it. Can't figure out exactly why this would > crash rather then leak, but in any case it's a bug. Yeah, I don't see why it would crash either. But yes, it could leak. Same issue with ParseEnumValue(), ParseIntWithBounds(). --------------------------------------------------- We should fix those three methods, then see whether talkback still shows the 1.7b crash it's showing now in nsHTMLTableElement::ParseAttribute...
We should fix this on branch too....
Flags: blocking1.7?
Flags: blocking1.7? → blocking1.7+
Attached patch patch to fixSplinter Review
the changes to nsAttrValue::ParseColor doesn't actually fix leaks. It's just to make that function behave more consistently with the other parse functions which resets the attrvalue in case the parsing failed.
Attachment #147351 - Flags: superreview?(bzbarsky)
Attachment #147351 - Flags: review?(bzbarsky)
Comment on attachment 147351 [details] [diff] [review] patch to fix r+sr=bzbarsky
Attachment #147351 - Flags: superreview?(bzbarsky)
Attachment #147351 - Flags: superreview+
Attachment #147351 - Flags: review?(bzbarsky)
Attachment #147351 - Flags: review+
Comment on attachment 147351 [details] [diff] [review] patch to fix this patch is very simple so it should be safe. I'm not sure that we're actually leaking memory as it is, because in most cases we're passing attrvalues that are already reset. However I'm not 100% sure that's always the case, so it would definitly be good to have this checked in.
Attachment #147351 - Flags: approval1.7?
Comment on attachment 147351 [details] [diff] [review] patch to fix a=asa (on behalf of drivers) for checkin to 1.7
Attachment #147351 - Flags: approval1.7? → approval1.7+
checked in on both branch and trunk
Status: NEW → RESOLVED
Closed: 21 years ago
Keywords: fixed1.7
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: