[webkit-reviews] review granted: [Bug 185239] Widgets should hold a WeakPtr to their parents : [Attachment 339390] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 3 06:45:03 PDT 2018
zalan <zalan at apple.com> has granted Brent Fulgham <bfulgham at webkit.org>'s
request for review:
Bug 185239: Widgets should hold a WeakPtr to their parents
https://bugs.webkit.org/show_bug.cgi?id=185239
Attachment 339390: Patch
https://bugs.webkit.org/attachment.cgi?id=339390&action=review
--- Comment #3 from zalan <zalan at apple.com> ---
Comment on attachment 339390
--> https://bugs.webkit.org/attachment.cgi?id=339390
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=339390&action=review
> Source/WebCore/platform/Widget.cpp:37
> + m_parent = nullptr;
No need to null the weak ptr; unless we call init() outside of the object
construction.
> Source/WebCore/platform/Widget.cpp:50
> + m_parent = view ? view->createWeakPtr() : nullptr;
I'd rather use makeWeakPtr() helper here (with auto& weakPtrFactory() const {
return m_weakFactory; } on the ScrollView.)
More information about the webkit-reviews
mailing list