Commit 8e8f0e5d authored by bokan's avatar bokan Committed by Commit bot

Don't enter gesture event handling when a frame is detached.

Some code paths are unguarded for the case where we get events while shutting
down/detaching a Frame. With this patch we just early-out.

BUG=655306

Review-Url: https://codereview.chromium.org/2540573002
Cr-Commit-Position: refs/heads/master@{#434876}
parent ab7cdd7f
...@@ -1350,6 +1350,8 @@ WebInputEventResult EventHandler::handleGestureEvent( ...@@ -1350,6 +1350,8 @@ WebInputEventResult EventHandler::handleGestureEvent(
WebInputEventResult EventHandler::handleGestureEvent( WebInputEventResult EventHandler::handleGestureEvent(
const GestureEventWithHitTestResults& targetedEvent) { const GestureEventWithHitTestResults& targetedEvent) {
TRACE_EVENT0("input", "EventHandler::handleGestureEvent"); TRACE_EVENT0("input", "EventHandler::handleGestureEvent");
if (!m_frame->host())
return WebInputEventResult::NotHandled;
// Propagation to inner frames is handled below this function. // Propagation to inner frames is handled below this function.
ASSERT(m_frame == m_frame->localFrameRoot()); ASSERT(m_frame == m_frame->localFrameRoot());
...@@ -1381,12 +1383,17 @@ WebInputEventResult EventHandler::handleGestureEventInFrame( ...@@ -1381,12 +1383,17 @@ WebInputEventResult EventHandler::handleGestureEventInFrame(
WebInputEventResult EventHandler::handleGestureScrollEvent( WebInputEventResult EventHandler::handleGestureScrollEvent(
const PlatformGestureEvent& gestureEvent) { const PlatformGestureEvent& gestureEvent) {
TRACE_EVENT0("input", "EventHandler::handleGestureScrollEvent"); TRACE_EVENT0("input", "EventHandler::handleGestureScrollEvent");
if (!m_frame->host())
return WebInputEventResult::NotHandled;
return m_scrollManager->handleGestureScrollEvent(gestureEvent); return m_scrollManager->handleGestureScrollEvent(gestureEvent);
} }
WebInputEventResult EventHandler::handleGestureScrollEnd( WebInputEventResult EventHandler::handleGestureScrollEnd(
const PlatformGestureEvent& gestureEvent) { const PlatformGestureEvent& gestureEvent) {
if (!m_frame->host())
return WebInputEventResult::NotHandled;
return m_scrollManager->handleGestureScrollEnd(gestureEvent); return m_scrollManager->handleGestureScrollEnd(gestureEvent);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment