[Webkit-unassigned] [Bug 160871] Cleanup WK2 platform gamepad handling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 16 08:30:25 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=160871

--- Comment #4 from Brady Eidson <beidson at apple.com> ---
(In reply to comment #2)
> Comment on attachment 286103 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=286103&action=review
> 
> > Source/WebCore/platform/gamepad/GamepadProviderClient.h:40
> > +    virtual void setInitialConnectedGamepads(const Vector<PlatformGamepad*>&) { }
> 
> I don't understand the lifetime of these PlatformGamepads.  Where do they
> come from?  How do we know they will still be alive as long as we have
> pointers to them?

The platform GamepadProvider owns them. They are valid until you get a "platformGamepadDisconnected" message.

> 
> > Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h:87
> > +    bool m_hasInitialGamepads { false };
> 
> This is only used in an assertion.  Could be compiled out.  Probably nbd

I'd like to leave it for now, as there are grander plans for it going forward - Though I will remain cognizant of whether or not it is assertion-only.

> 
> > Source/WebKit2/WebProcess/WebProcess.cpp:1036
> > +void WebProcess::setInitialGamepads(const Vector<WebKit::GamepadData>& gamepadDatas)
> 
> data is already plural

Do you have a naming suggestion for a "vector of GamepadData" that is not "gamepadDatas" but also not "gamepadDataVector"? :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160816/38d55855/attachment.html>


More information about the webkit-unassigned mailing list