[Webkit-unassigned] [Bug 177489] [iOS] Respect the "caret-color" CSS property when editing
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 4 19:29:19 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=177489
--- Comment #5 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 322744
--> https://bugs.webkit.org/attachment.cgi?id=322744
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=322744&action=review
> Tools/TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:304
> + TestWKWebView *webView = [[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)];
Looks like TestWKWebView leaks here. We can fix this in a few ways -- one is to just call -release at the end of this test, and another is to autorelease here right after initializing webView. But in WebKit, we often use RetainPtr and adoptNS instead to tie -retain/-release calls to the lifetime of C++ objects (RetainPtrs) so we don't have to explicitly call -retain or -release, so this line could look like this:
auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]);
...and then RetainPtr automatically takes care of releasing when it gets destroyed. The `auto` keyword here expands to the return type of adoptNS, which in this case is RetainPtr<TestWKWebView>.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171005/3a422329/attachment.html>
More information about the webkit-unassigned
mailing list