Destroying a window on long press doesn't crash.
The most obvious symptom of this issue is triggered by
https://code.google.com/p/chromium/codesearch#chromium/src/ash/drag_drop/drag_drop_controller.cc&l=227.
When you long press a bookmark, for example, a nested
message loop is created, while the gesture detector hasn't
finished processing the long press gesture. The window is
deleted within this nested message loop, which ends up
deleting the gesture detector.
This change ensures that the gesture detector doesn't
touch any local variables after dispatching events
triggered by timeouts.
BUG=391063
TEST=GestureRecognizerTest.GestureEventLongPressDeletingWindow
TBR=sadrul@chromium.org
Review URL: https://codereview.chromium.org/
370013002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281549 0039d316-1c4b-4281-b951-d872f2087c98