Bug 94669

Summary: [GTK] contextClick and getMenuItemTitle callbacks are leaky in DRT's EventSender
Product: WebKit Reporter: Sudarsana Nagineni (babu) <naginenis>
Component: WebKitGTKAssignee: Sudarsana Nagineni (babu) <naginenis>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, pnormand, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Sudarsana Nagineni (babu) 2012-08-21 22:32:43 PDT
Found new memory leaks in DRT's EventSender.cpp

==9709== 240 (24 direct, 216 indirect) bytes in 1 blocks are definitely lost in loss record 22,591 of 24,861
==9709==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9709==    by 0xA9EBA38: g_malloc (gmem.c:159)
==9709==    by 0xA9FEC62: g_slice_alloc (gslice.c:1003)
==9709==    by 0xA9E283D: g_list_prepend (glist.c:275)
==9709==    by 0x975D40E: gtk_container_children_callback (gtkcontainer.c:2889)
==9709==    by 0x9803E2C: gtk_menu_shell_forall (gtkmenushell.c:1218)
==9709==    by 0x976182D: gtk_container_get_children (gtkcontainer.c:2105)
==9709==    by 0x477A4A: contextClickCallback(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (EventSender.cpp:219)

==9709== 2,670 (1,080 direct, 1,590 indirect) bytes in 45 blocks are definitely lost in loss record 24,378 of 24,861
==9709==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9709==    by 0x560E9E2: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:268)
==9709==    by 0x52BCD5E: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==9709==    by 0x52CE2D0: OpaqueJSString::create(unsigned short const*, unsigned int) (OpaqueJSString.h:46)
==9709==    by 0x52CDFE5: JSStringCreateWithUTF8CString (JSStringRef.cpp:50)
==9709==    by 0x477830: getMenuItemTitleCallback(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**) (EventSender.cpp:160)
==9709==    by 0x52B81F9: JSC::JSCallbackObject<JSC::JSNonFinalObject>::getStaticValue(JSC::ExecState*, JSC::PropertyName) (JSCallbackObjectFunctions.h:529)
==9709==    by 0x52B4E86: JSC::JSCallbackObject<JSC::JSNonFinalObject>::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) (JSCallbackObjectFunctions.h:165)
==9709==    by 0x49188E: JSC::JSCell::fastGetOwnPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) (JSObject.h:618)
==9709==    by 0x53C15B3: JSC::JSValue::get(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) const (JSObject.h:873)
Comment 1 Sudarsana Nagineni (babu) 2012-08-21 22:42:55 PDT
Created attachment 159862 [details]
Patch
Comment 2 Carlos Garcia Campos 2012-08-21 23:03:59 PDT
Comment on attachment 159862 [details]
Patch

Thanks!
Comment 3 WebKit Review Bot 2012-08-21 23:47:15 PDT
Comment on attachment 159862 [details]
Patch

Clearing flags on attachment: 159862

Committed r126267: <http://trac.webkit.org/changeset/126267>
Comment 4 WebKit Review Bot 2012-08-21 23:47:19 PDT
All reviewed patches have been landed.  Closing bug.