Skip to content
Permalink
Browse files
WTR::InjectedBundlePage::willSendRequestForFrame() leaks a WKDataRef
<https://webkit.org/b/194286>
<rdar://problem/47815558>

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::willSendRequestForFrame): Use
WKRetainPtr<> to avoid leaking the WKDataRef.


Canonical link: https://commits.webkit.org/208788@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ddkilzer committed Feb 6, 2019
1 parent fb6ccf5 commit f4982e2f9c400811dc2f8785fc1548161af7de06
Showing 2 changed files with 14 additions and 1 deletion.
@@ -1,3 +1,15 @@
2019-02-06 David Kilzer <ddkilzer@apple.com>

WTR::InjectedBundlePage::willSendRequestForFrame() leaks a WKDataRef
<https://webkit.org/b/194286>
<rdar://problem/47815558>

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::willSendRequestForFrame): Use
WKRetainPtr<> to avoid leaking the WKDataRef.

2019-02-06 Michael Catanzaro <mcatanzaro@igalia.com>

Unreviewed, fix a typo
@@ -1211,7 +1211,8 @@ WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef page
String body = injectedBundle.testRunner()->willSendRequestHTTPBody();
if (!body.isEmpty()) {
CString cBody = body.utf8();
return WKURLRequestCopySettingHTTPBody(request, WKDataCreate(reinterpret_cast<const unsigned char*>(cBody.data()), cBody.length()));
WKRetainPtr<WKDataRef> body = adoptWK(WKDataCreate(reinterpret_cast<const unsigned char*>(cBody.data()), cBody.length()));
return WKURLRequestCopySettingHTTPBody(request, body.get());
}
}

0 comments on commit f4982e2

Please sign in to comment.