Bug 100770 - [WTR] Memory leaks in TestWebKitAPI::didReceiveMessageFromInjectedBundle()
Summary: [WTR] Memory leaks in TestWebKitAPI::didReceiveMessageFromInjectedBundle()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sudarsana Nagineni (babu)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-30 10:06 PDT by Sudarsana Nagineni (babu)
Modified: 2012-10-30 23:08 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.56 KB, patch)
2012-10-30 10:14 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sudarsana Nagineni (babu) 2012-10-30 10:06:31 PDT
We should adopt the WKStringRef returned by WKStringCreateWithUTF8CString() to fix the following leaks.

==18615== 74 (24 direct, 50 indirect) bytes in 1 blocks are definitely lost in loss record 757 of 1,113
==18615==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18615==    by 0x43790A: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:269)
==18615==    by 0x54485C8: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==18615==    by 0x54ABC56: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:62)
==18615==    by 0x54AB871: WKStringCreateWithUTF8CString (WKString.cpp:41)
==18615==    by 0x434AE6: TestWebKitAPI::didReceiveMessageFromInjectedBundle(OpaqueWKContext const*, OpaqueWKString const*, void const*, void const*) (WillSendSubmitEvent.cpp:44)
==18615==    by 0x54E8974: WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebKit::WebContext*, WTF::String const&, WebKit::APIObject*) (WebContextInjectedBundleClient.cpp:41)

==18615== 78 (24 direct, 54 indirect) bytes in 1 blocks are definitely lost in loss record 760 of 1,113
==18615==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18615==    by 0x43790A: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:269)
==18615==    by 0x54485C8: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==18615==    by 0x54ABC56: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:62)
==18615==    by 0x54AB871: WKStringCreateWithUTF8CString (WKString.cpp:41)
==18615==    by 0x434C8B: TestWebKitAPI::didReceiveMessageFromInjectedBundle(OpaqueWKContext const*, OpaqueWKString const*, void const*, void const*) (WillSendSubmitEvent.cpp:51)
==18615==    by 0x54E8974: WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebKit::WebContext*, WTF::String const&, WebKit::APIObject*) (WebContextInjectedBundleClient.cpp:41)

==18615== 82 (24 direct, 58 indirect) bytes in 1 blocks are definitely lost in loss record 791 of 1,113
==18615==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18615==    by 0x43790A: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:269)
==18615==    by 0x54485C8: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==18615==    by 0x54ABC56: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:62)
==18615==    by 0x54AB871: WKStringCreateWithUTF8CString (WKString.cpp:41)
==18615==    by 0x434BBD: TestWebKitAPI::didReceiveMessageFromInjectedBundle(OpaqueWKContext const*, OpaqueWKString const*, void const*, void const*) (WillSendSubmitEvent.cpp:47)
==18615==    by 0x54E8974: WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebKit::WebContext*, WTF::String const&, WebKit::APIObject*) (WebContextInjectedBundleClient.cpp:41)
Comment 1 Sudarsana Nagineni (babu) 2012-10-30 10:14:32 PDT
Created attachment 171476 [details]
Patch
Comment 2 WebKit Review Bot 2012-10-30 23:08:38 PDT
Comment on attachment 171476 [details]
Patch

Clearing flags on attachment: 171476

Committed r132988: <http://trac.webkit.org/changeset/132988>
Comment 3 WebKit Review Bot 2012-10-30 23:08:42 PDT
All reviewed patches have been landed.  Closing bug.