Avoid crash when checking gamepad user activation
The Gamepad API may be invoked after the frame has been detached, in which case GetPage() and GetFrame() will be null. If the Gamepad API was uninitialized before the frame was detached, the gamepads_ buffer may also be null. This CL adds more null checks to the user activation check to ensure we do not try to access the page after it has been detached. BUG=852517 Change-Id: I4d8152a9a16a027719d31150bd1b7687fdf991a0 Reviewed-on: https://chromium-review.googlesource.com/1101926Reviewed-by:Brandon Jones <bajones@chromium.org> Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/master@{#567737}
Showing
Please register or sign in to comment