<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Cleanup WK2 platform gamepad handling"
href="https://bugs.webkit.org/show_bug.cgi?id=160871#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Cleanup WK2 platform gamepad handling"
href="https://bugs.webkit.org/show_bug.cgi?id=160871">bug 160871</a>
from <span class="vcard"><a class="email" href="mailto:beidson@apple.com" title="Brady Eidson <beidson@apple.com>"> <span class="fn">Brady Eidson</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=160871#c2">comment #2</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=286103&action=diff" name="attach_286103" title="Patch">attachment 286103</a> <a href="attachment.cgi?id=286103&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=286103&action=review">https://bugs.webkit.org/attachment.cgi?id=286103&action=review</a>
>
> > 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?</span >
The platform GamepadProvider owns them. They are valid until you get a "platformGamepadDisconnected" message.
<span class="quote">>
> > Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h:87
> > + bool m_hasInitialGamepads { false };
>
> This is only used in an assertion. Could be compiled out. Probably nbd</span >
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.
<span class="quote">>
> > Source/WebKit2/WebProcess/WebProcess.cpp:1036
> > +void WebProcess::setInitialGamepads(const Vector<WebKit::GamepadData>& gamepadDatas)
>
> data is already plural</span >
Do you have a naming suggestion for a "vector of GamepadData" that is not "gamepadDatas" but also not "gamepadDataVector"? :)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>