Changeset 260544 in webkit
- Timestamp:
- Apr 22, 2020 5:04:26 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r260527 r260544 1 2020-04-22 Chris Dumez <cdumez@apple.com> 2 3 [iOS] Crash on RunningBoard process assertion invalidation 4 https://bugs.webkit.org/show_bug.cgi?id=210873 5 <rdar://problem/62194917> 6 7 Reviewed by Darin Adler. 8 9 * UIProcess/ios/ProcessAssertionIOS.mm: 10 (-[WKRBSAssertionDelegate assertion:didInvalidateWithError:]): 11 Capture a weak pointer to self and make sure we only access the invalidation handler on 12 the main thread if |self| is still alive. 13 14 (WebKit::ProcessAssertion::~ProcessAssertion): 15 Null out the WKRBSAssertionDelegate's observer in the ProcessAssertion destructor, to 16 make sure processAssertionWasInvalidated() cannot get called after the ProcessAssertion 17 has been destroyed. 18 1 19 2020-04-22 David Kilzer <ddkilzer@apple.com> 2 20 -
trunk/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm
r260453 r260544 287 287 { 288 288 RELEASE_LOG(ProcessSuspension, "%p - WKRBSAssertionDelegate: assertion was invalidated, error: %{public}@", error, self); 289 290 __weak WKRBSAssertionDelegate *weakSelf = self; 289 291 dispatch_async(dispatch_get_main_queue(), ^{ 290 if (_invalidationCallback) 291 _invalidationCallback(); 292 WKRBSAssertionDelegate *strongSelf = weakSelf; 293 if (strongSelf && strongSelf.invalidationCallback) 294 strongSelf.invalidationCallback(); 292 295 }); 293 296 } … … 420 423 421 424 if (m_rbsAssertion) { 425 m_delegate.get().invalidationCallback = nil; 426 m_delegate = nil; 427 422 428 [m_rbsAssertion removeObserver:m_delegate.get()]; 423 429 [m_rbsAssertion invalidate];
Note: See TracChangeset
for help on using the changeset viewer.