Changeset 170988 in webkit
- Timestamp:
- Jul 10, 2014, 7:29:33 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r170987 r170988 1 2014-07-10 Benjamin Poulain <bpoulain@apple.com> 2 3 [iOS][WK2] It should be safe to call WKContentViewInteraction's cleanupInteraction multiple times 4 https://bugs.webkit.org/show_bug.cgi?id=134820 5 6 Reviewed by Andreas Kling. 7 8 If a view is destroyed just after a crash, "cleanupInteraction" is called twice: once on crash, 9 once on dealloc. 10 11 The code handling _interactionViewsContainerView is using KVO to monitor transform changes. It is not safe 12 to remove the observer if we are not already observing on that view. 13 14 To solve the problem, this patch makes the cleanup actually remove the view so that setup and cleanup 15 are completely symmetrical. If cleanup is called twice, the second time would not enter the branch because 16 the view is already nil. 17 18 * UIProcess/ios/WKContentViewInteraction.mm: 19 (-[WKContentView setupInteraction]): 20 (-[WKContentView cleanupInteraction]): 21 1 22 2014-07-10 Simon Fraser <simon.fraser@apple.com> 2 23 -
trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
r170981 r170988 221 221 [_interactionViewsContainerView setOpaque:NO]; 222 222 [_interactionViewsContainerView layer].anchorPoint = CGPointZero; 223 } 224 [_interactionViewsContainerView setHidden:NO]; 223 [self.superview addSubview:_interactionViewsContainerView.get()]; 224 } 225 225 226 [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionInitial context:nil]; 226 227 … … 277 278 _formInputSession = nil; 278 279 [_highlightView removeFromSuperview]; 279 [self.layer removeObserver:self forKeyPath:@"transform"]; 280 [_interactionViewsContainerView setHidden:YES]; 280 281 if (_interactionViewsContainerView) { 282 [self.layer removeObserver:self forKeyPath:@"transform"]; 283 [_interactionViewsContainerView removeFromSuperview]; 284 _interactionViewsContainerView = nil; 285 } 286 281 287 [_touchEventGestureRecognizer setDelegate:nil]; 282 288 [self removeGestureRecognizer:_touchEventGestureRecognizer.get()];
Note:
See TracChangeset
for help on using the changeset viewer.