Changeset 244781 in webkit
- Timestamp:
- Apr 30, 2019, 10:37:47 AM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/mac/WKImmediateActionController.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r244779 r244781 1 2019-04-30 Tim Horton <timothy_horton@apple.com> 2 3 Long-standing rare crash under -[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal...] 4 https://bugs.webkit.org/show_bug.cgi?id=197404 5 <rdar://problem/24589331> 6 7 Reviewed by Wenson Hsieh. 8 9 * UIProcess/mac/WKImmediateActionController.mm: 10 (-[WKImmediateActionController _updateImmediateActionItem]): 11 (-[WKImmediateActionController menuItem:previewItemAtPoint:]): 12 (-[WKImmediateActionController menuItem:itemFrameForPoint:]): 13 (-[WKImmediateActionController _animationControllerForDataDetectedLink]): 14 Add some null checks; _webHitTestResult can be null if we (somehow) get 15 an immediate action gesture without having previously gotten a 16 mouseDidMoveOverElement from the Web Content process. Cover all our bases. 17 1 18 2019-04-30 Per Arne Vollan <pvollan@apple.com> 2 19 -
trunk/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm
r238771 r244781 329 329 330 330 RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult]; 331 if (!hitTestResult) { 332 [self _cancelImmediateAction]; 333 return; 334 } 335 331 336 id customClientAnimationController = _page->immediateActionAnimationControllerForHitTestResult(hitTestResult, _type, _userData); 332 337 if (customClientAnimationController == [NSNull null]) { … … 354 359 355 360 RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult]; 361 if (!hitTestResult) 362 return nil; 363 356 364 return [NSURL _web_URLWithWTFString:hitTestResult->absoluteLinkURL()]; 357 365 } … … 373 381 374 382 RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult]; 383 if (!hitTestResult) 384 return NSZeroRect; 385 375 386 return [_view convertRect:hitTestResult->elementBoundingBox() toView:nil]; 376 387 } … … 450 461 451 462 RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult]; 463 if (!hitTestResult) 464 return nil; 465 452 466 NSArray *menuItems = [[getDDActionsManagerClass() sharedManager] menuItemsForTargetURL:hitTestResult->absoluteLinkURL() actionContext:_currentActionContext.get()]; 453 467
Note:
See TracChangeset
for help on using the changeset viewer.