[Webkit-unassigned] [Bug 178893] New: Revisit WebKit api pattern where Page owns the client.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 26 16:26:07 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=178893
Bug ID: 178893
Summary: Revisit WebKit api pattern where Page owns the client.
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit2
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jeremyj-wk at apple.com
> This API seems a bit weird. Normally you don't pass ownership of a client to
> the thing that it's a client of. You hold ownership, and the client
> relationship is weak.
Search for '_page->set[a-zA-Z]*Client\(' shows this pattern in lots of places:
_page->setFindClient(std::make_unique<WebKit::FindClient>(self));
_page->setDiagnosticLoggingClient(std::make_unique<WebKit::DiagnosticLoggingClient>(self));
_page->setNavigationClient(_navigationState->createNavigationClient());
_page->setContextMenuClient(_uiDelegate->createContextMenuClient());
_page->setUIClient(_uiDelegate->createUIClient());
_page->setIconLoadingClient(_iconLoadingDelegate->createIconLoadingClient());
_page->setHistoryClient(_navigationState->createHistoryClient());
_page->setFormClient(std::make_unique<FormClient>(self));
m_page->setFullscreenClient(std::make_unique<WebKit::FullscreenClient>(view));
_page->setFindMatchesClient(std::make_unique<TextFinderFindClient>(self));
Maybe this should be revisited
--
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/20171026/60cfda9f/attachment.html>
More information about the webkit-unassigned
mailing list