Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle potential overflow of gamepadEventListenerCount.
https://bugs.webkit.org/show_bug.cgi?id=256205. rdar://80838189. Reviewed by Ryosuke Niwa. m_gamepadEventListenerCount can overflow if addEventListener() is called UINT_MAX+1 times. Once the window is freed, we will be left with a dangling pointer in the GamepadManager. This change adds a flag to check for overflow and keep the behavior same in the event of overflow.. * Source/WebCore/page/DOMWindow.cpp: (WebCore::DOMWindow::~DOMWindow): (WebCore::DOMWindow::incrementGamepadEventListenerCount): (WebCore::DOMWindow::decrementGamepadEventListenerCount): * Source/WebCore/page/DOMWindow.h: Canonical link: https://commits.webkit.org/259548.729@safari-7615-branch
- Loading branch information