Changeset 149704 in webkit


Ignore:
Timestamp:
May 7, 2013 6:35:51 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Fix a memory leak introduced in r149692
https://bugs.webkit.org/show_bug.cgi?id=115766

Patch by Alex Christensen <achristensen@apple.com> on 2013-05-07
Reviewed by Mark Rowe.

In r149692, the fix for <http://webkit.org/b/42324>, a call to WKBundleFrameCopyWebArchive was added without any
matching call to WKRelease. An earlier attempted fix in r149697 introduced a RetainPtr but failed to adopt the object.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::dumpDOMAsWebArchive):
Fix the memory leak by switching to WKRetainPtr and adopting the returned object.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r149703 r149704  
     12013-05-07  Alex Christensen  <achristensen@apple.com>
     2
     3        Fix a memory leak introduced in r149692
     4        https://bugs.webkit.org/show_bug.cgi?id=115766
     5
     6        Reviewed by Mark Rowe.
     7
     8        In r149692, the fix for <http://webkit.org/b/42324>, a call to WKBundleFrameCopyWebArchive was added without any
     9        matching call to WKRelease. An earlier attempted fix in r149697 introduced a RetainPtr but failed to adopt the object.
     10
     11        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
     12        (WTR::InjectedBundlePage::dumpDOMAsWebArchive):
     13        Fix the memory leak by switching to WKRetainPtr and adopting the returned object.
     14
    1152013-05-07  Darin Adler  <darin@apple.com>
    216
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

    r149697 r149704  
    846846{
    847847#if USE(CF)
    848     RetainPtr<WKDataRef> wkData = WKBundleFrameCopyWebArchive(frame);
     848    WKRetainPtr<WKDataRef> wkData = adoptWK(WKBundleFrameCopyWebArchive(frame));
    849849    RetainPtr<CFDataRef> cfData = adoptCF(CFDataCreate(0, WKDataGetBytes(wkData.get()), WKDataGetSize(wkData.get())));
    850850    RetainPtr<CFStringRef> cfString = adoptCF(createXMLStringFromWebArchiveData(cfData.get()));
Note: See TracChangeset for help on using the changeset viewer.