[Webkit-unassigned] [Bug 115647] [atk] Replace deprecated call to atk_document_get_locale() in DumpRenderTree

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 4 01:43:13 PDT 2013


--- Comment #31 from Mario Sanchez Prada <mario at webkit.org>  2013-06-04 01:41:44 PST ---
(From update of attachment 203613)
View in context: https://bugs.webkit.org/attachment.cgi?id=203613&action=review

>> Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:820
>> +        atk_attribute_set_free(textAttributes.get());
> I think it's a mistake to use a GOwnPtr and to manually free the same thing. Either make GOwnPtr specialization for AtkTextAttributes (if one doesn't exist already) or free it manually.

I agree with Martin here. If you use atk_attribute_set_free() then you should not use GOwnPtr at all, since you might be causing a double-free error later: atk_attribute_set_free() frees the memory used by the GSList but does NOT set that pointer to NULL, so when you go out of scope the GOwnPtr will try to free again the already freed memory block.

About the idea of specializing GOwnPtr for AtkAttributeSet, I'm fine with that too, but I guess it would be better to get this patch landed first and then file a new bug to "fix" the memory freeing logic at once with one patch, doing the needed changes where needed (I think it would be DRT, WKTR and this wrapper only, but please double check).

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list