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

Changeset 195424 in webkit


Ignore:
Timestamp:
Jan 21, 2016, 3:34:01 PM (11 years ago)
Author:
dino@apple.com
Message:

[iOS] Crash in _endPotentialTapAndEnableDoubleTapGesturesIfNecessary
https://bugs.webkit.org/show_bug.cgi?id=153326
<rdar://problem/24264339>

Reviewed by Anders Carlsson.

UIKit's UIGestureRecognizer could call back into the WKContentView
after the associated WKWebView has disappeared. The fix is to
explicitly null the WKWebView reference as we deallocate.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView dealloc]): Tell the WKContentView we are going away.

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _webViewDestroyed]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
Only do something if the WKWebView is still around.

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r195421 r195424  
     12016-01-21  Dean Jackson  <dino@apple.com>
     2
     3        [iOS] Crash in _endPotentialTapAndEnableDoubleTapGesturesIfNecessary
     4        https://bugs.webkit.org/show_bug.cgi?id=153326
     5        <rdar://problem/24264339>
     6
     7        Reviewed by Anders Carlsson.
     8
     9        UIKit's UIGestureRecognizer could call back into the WKContentView
     10        after the associated WKWebView has disappeared. The fix is to
     11        explicitly null the WKWebView reference as we deallocate.
     12
     13        * UIProcess/API/Cocoa/WKWebView.mm:
     14        (-[WKWebView dealloc]): Tell the WKContentView we are going away.
     15        * UIProcess/ios/WKContentView.h:
     16        * UIProcess/ios/WKContentView.mm:
     17        (-[WKContentView _webViewDestroyed]):
     18        * UIProcess/ios/WKContentViewInteraction.mm:
     19        (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
     20        Only do something if the WKWebView is still around.
     21
    1222016-01-21  Beth Dakin  <bdakin@apple.com>
    223
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r195421 r195424  
    485485
    486486#if PLATFORM(IOS)
     487    [_contentView _webViewDestroyed];
     488
    487489    if (_remoteObjectRegistry)
    488490        _page->process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID());
  • trunk/Source/WebKit2/UIProcess/ios/WKContentView.h

    r191644 r195424  
    7676- (void)willStartZoomOrScroll;
    7777
     78- (void)_webViewDestroyed;
     79
    7880- (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy;
    7981- (void)_processDidExit;
  • trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm

    r194496 r195424  
    454454}
    455455
     456- (void)_webViewDestroyed
     457{
     458    _webView = nil;
     459}
     460
    456461#pragma mark PageClientImpl methods
    457462
Note: See TracChangeset for help on using the changeset viewer.