NEW 190319
Make it more clear that a WebPageProxy always has an API::UIClient
https://bugs.webkit.org/show_bug.cgi?id=190319
Summary Make it more clear that a WebPageProxy always has an API::UIClient
Alex Christensen
Reported 2018-10-05 11:30:47 PDT
Make it more clear that a WebPageProxy always has an API::UIClient
Attachments
Patch (5.57 KB, patch)
2018-10-05 11:32 PDT, Alex Christensen
no flags
Patch (6.12 KB, patch)
2018-10-05 15:10 PDT, Alex Christensen
mcatanzaro: review+
Alex Christensen
Comment 1 2018-10-05 11:32:12 PDT
Alex Christensen
Comment 2 2018-10-05 15:10:39 PDT
EWS Watchlist
Comment 3 2018-10-05 15:13:01 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Michael Catanzaro
Comment 4 2018-10-06 01:51:25 PDT
Comment on attachment 351702 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351702&action=review > Source/WebKit/UIProcess/WebPageProxy.cpp:-601 > - if (!uiClient) { > - m_uiClient = std::make_unique<API::UIClient>(); > - return; > - } Yeah this wasn't great. > Source/WebKit/UIProcess/WebPageProxy.h:1863 > - std::unique_ptr<API::UIClient> m_uiClient; > + UniqueRef<API::UIClient> m_uiClient; OK, so this is an opportunity for me to learn about UniqueRef. Looks like it's good when: * You need polymorphism, so a pointer or reference is required * You want ownership of a non-refcounted type * It's nonnull, so a reference is better than a pointer I wonder why the standard library doesn't have this....
Note You need to log in before you can comment on or make changes to this bug.