⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 179736 in webkit


Ignore:
Timestamp:
Feb 5, 2015, 6:21:40 PM (12 years ago)
Author:
timothy_horton@apple.com
Message:

Null deref in ViewGestureController::beginSwipeGesture when swiping while script is navigating
https://bugs.webkit.org/show_bug.cgi?id=141308
<rdar://problem/18460046>

Reviewed by Simon Fraser.

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::trackSwipeGesture):
If script navigates (history.back, probably other cases too) while in the middle of
building up enough scroll events to start a swipe, it can destroy the history item
that we were planning to swipe to. If this happens, bail from the swipe.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r179732 r179736  
     12015-02-05  Tim Horton  <timothy_horton@apple.com>
     2
     3        Null deref in ViewGestureController::beginSwipeGesture when swiping while script is navigating
     4        https://bugs.webkit.org/show_bug.cgi?id=141308
     5        <rdar://problem/18460046>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * UIProcess/mac/ViewGestureControllerMac.mm:
     10        (WebKit::ViewGestureController::trackSwipeGesture):
     11        If script navigates (history.back, probably other cases too) while in the middle of
     12        building up enough scroll events to start a swipe, it can destroy the history item
     13        that we were planning to swipe to. If this happens, bail from the swipe.
     14
    1152015-02-05  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm

    r179373 r179736  
    388388    CGFloat minProgress = (direction == SwipeDirection::Right) ? -1 : 0;
    389389    RefPtr<WebBackForwardListItem> targetItem = (direction == SwipeDirection::Left) ? m_webPageProxy.backForwardList().backItem() : m_webPageProxy.backForwardList().forwardItem();
     390    if (!targetItem)
     391        return;
     392   
    390393    __block bool swipeCancelled = false;
    391394
Note: See TracChangeset for help on using the changeset viewer.