Changeset 217956 in webkit
- Timestamp:
- Jun 8, 2017, 5:46:38 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/Cocoa/WKWebView.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r217951 r217956 1 2017-06-08 Simon Fraser <simon.fraser@apple.com> 2 3 Crash under -[WKWebView _updateVisibleContentRects] 4 https://bugs.webkit.org/show_bug.cgi?id=173123 5 rdar://problem/32650112 6 7 Reviewed by Tim Horton. 8 9 Make sure the WKWebView is valid in places where we dispatch_async or use 10 a pre-commit handler. 11 12 Speculative fix for a rare crasher. 13 14 * UIProcess/API/Cocoa/WKWebView.mm: 15 (-[WKWebView _isValid]): 16 (-[WKWebView _addUpdateVisibleContentRectPreCommitHandler]): 17 (-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]): 18 1 19 2017-06-07 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r217934 r217956 317 317 } 318 318 319 - (BOOL)_isValid 320 { 321 return _page && _page->isValid(); 322 } 323 319 324 #if PLATFORM(IOS) 320 325 static int32_t deviceOrientationForUIInterfaceOrientation(UIInterfaceOrientation orientation) … … 2354 2359 [CATransaction addCommitHandler:[retainedSelf] { 2355 2360 WKWebView *webView = retainedSelf.get(); 2361 if (![webView _isValid]) 2362 return; 2356 2363 [webView _updateVisibleContentRects]; 2357 2364 webView->_hasScheduledVisibleRectUpdate = NO; … … 2378 2385 dispatch_async(dispatch_get_main_queue(), [retainedSelf = retainPtr(self)] { 2379 2386 WKWebView *webView = retainedSelf.get(); 2387 if (![webView _isValid]) 2388 return; 2380 2389 [webView _addUpdateVisibleContentRectPreCommitHandler]; 2381 2390 }); … … 3789 3798 - (pid_t)_webProcessIdentifier 3790 3799 { 3791 return _page->isValid() ? _page->processIdentifier() : 0; 3800 if (![self _isValid]) 3801 return 0; 3802 3803 return _page->processIdentifier(); 3792 3804 } 3793 3805 3794 3806 - (void)_killWebContentProcess 3795 3807 { 3796 if (! _page->isValid())3808 if (![self _isValid]) 3797 3809 return; 3798 3810
Note:
See TracChangeset
for help on using the changeset viewer.