[webkit-reviews] review granted: [Bug 136193] Random Gamepad cleanup : [Attachment 237025] Patch v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 23 12:28:57 PDT 2014

Sam Weinig <sam at webkit.org> has granted Brady Eidson <beidson at apple.com>'s
request for review:
Bug 136193: Random Gamepad cleanup

Attachment 237025: Patch v1

------- Additional Comments from Sam Weinig <sam at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=237025&action=review

> Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:79
> +    if (index >= m_gamepads.size() || !m_gamepads[index])
> +	   return adoptRef(*Gamepad::create(platformGamepad).leakRef());

This looks suspect. Why can't you just return what Gamepad::create() returns
(you may have to chance Gamepad::create()  to return a PassRef<> I guess)?

> Source/WebCore/page/DOMWindow.h:451
> +	   WeakPtr<DOMWindow> createWeakPtr() { return
m_weakPtrFactory.createWeakPtr(); }
> +#endif

While Gamepad may be the only one using this right now, I don't think it makes
sense to put this under #if ENABLE(GAMEPAD).

More information about the webkit-reviews mailing list