Title: [149704] trunk/Tools
- Revision
- 149704
- Author
- [email protected]
- Date
- 2013-05-07 18:35:51 -0700 (Tue, 07 May 2013)
Log Message
Fix a memory leak introduced in r149692
https://bugs.webkit.org/show_bug.cgi?id=115766
Patch by Alex Christensen <[email protected]> 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.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (149703 => 149704)
--- trunk/Tools/ChangeLog 2013-05-08 01:26:34 UTC (rev 149703)
+++ trunk/Tools/ChangeLog 2013-05-08 01:35:51 UTC (rev 149704)
@@ -1,3 +1,17 @@
+2013-05-07 Alex Christensen <[email protected]>
+
+ Fix a memory leak introduced in r149692
+ https://bugs.webkit.org/show_bug.cgi?id=115766
+
+ 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.
+
2013-05-07 Darin Adler <[email protected]>
[Win] Fix storage leak in Windows DumpRenderTree
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (149703 => 149704)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp 2013-05-08 01:26:34 UTC (rev 149703)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp 2013-05-08 01:35:51 UTC (rev 149704)
@@ -845,7 +845,7 @@
void InjectedBundlePage::dumpDOMAsWebArchive(WKBundleFrameRef frame, StringBuilder& stringBuilder)
{
#if USE(CF)
- RetainPtr<WKDataRef> wkData = WKBundleFrameCopyWebArchive(frame);
+ WKRetainPtr<WKDataRef> wkData = adoptWK(WKBundleFrameCopyWebArchive(frame));
RetainPtr<CFDataRef> cfData = adoptCF(CFDataCreate(0, WKDataGetBytes(wkData.get()), WKDataGetSize(wkData.get())));
RetainPtr<CFStringRef> cfString = adoptCF(createXMLStringFromWebArchiveData(cfData.get()));
stringBuilder.append(cfString.get());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes