Title: [183957] trunk/Source/WebKit/mac
- Revision
- 183957
- Author
- timothy_hor...@apple.com
- Date
- 2015-05-07 16:08:01 -0700 (Thu, 07 May 2015)
Log Message
Occasional null deref in WebImmediateActionController
https://bugs.webkit.org/show_bug.cgi?id=144772
<rdar://problem/20811128>
Reviewed by Beth Dakin.
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _defaultAnimationController]):
(-[WebImmediateActionController _animationControllerForDataDetectedText]):
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
Null-check TextIndicators before dereferencing.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (183956 => 183957)
--- trunk/Source/WebKit/mac/ChangeLog 2015-05-07 22:46:43 UTC (rev 183956)
+++ trunk/Source/WebKit/mac/ChangeLog 2015-05-07 23:08:01 UTC (rev 183957)
@@ -1,3 +1,17 @@
+2015-05-07 Timothy Horton <timothy_hor...@apple.com>
+
+ Occasional null deref in WebImmediateActionController
+ https://bugs.webkit.org/show_bug.cgi?id=144772
+ <rdar://problem/20811128>
+
+ Reviewed by Beth Dakin.
+
+ * WebView/WebImmediateActionController.mm:
+ (-[WebImmediateActionController _defaultAnimationController]):
+ (-[WebImmediateActionController _animationControllerForDataDetectedText]):
+ (-[WebImmediateActionController _animationControllerForDataDetectedLink]):
+ Null-check TextIndicators before dereferencing.
+
2015-05-07 Beth Dakin <bda...@apple.com>
New force-related DOM events should fire in WK1 views
Modified: trunk/Source/WebKit/mac/WebView/WebImmediateActionController.mm (183956 => 183957)
--- trunk/Source/WebKit/mac/WebView/WebImmediateActionController.mm 2015-05-07 22:46:43 UTC (rev 183956)
+++ trunk/Source/WebKit/mac/WebView/WebImmediateActionController.mm 2015-05-07 23:08:01 UTC (rev 183957)
@@ -260,7 +260,8 @@
RefPtr<Range> linkRange = rangeOfContents(*_hitTestResult.URLElement());
RefPtr<TextIndicator> indicator = TextIndicator::createWithRange(*linkRange, TextIndicatorPresentationTransition::FadeIn);
- [_webView _setTextIndicator:*indicator withLifetime:TextIndicatorLifetime::Permanent];
+ if (indicator)
+ [_webView _setTextIndicator:*indicator withLifetime:TextIndicatorLifetime::Permanent];
QLPreviewMenuItem *item = [NSMenuItem standardQuickLookMenuItem];
item.previewStyle = QLPreviewStylePopover;
@@ -419,7 +420,8 @@
_currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
} interactionChangedHandler:^() {
- [_webView _setTextIndicator:*detectedDataTextIndicator withLifetime:TextIndicatorLifetime::Permanent];
+ if (detectedDataTextIndicator)
+ [_webView _setTextIndicator:*detectedDataTextIndicator withLifetime:TextIndicatorLifetime::Permanent];
} interactionStoppedHandler:^() {
[_webView _clearTextIndicatorWithAnimation:TextIndicatorDismissalAnimation::FadeOut];
}];
@@ -450,7 +452,8 @@
_currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
} interactionChangedHandler:^() {
- [_webView _setTextIndicator:*indicator withLifetime:TextIndicatorLifetime::Permanent];
+ if (indicator)
+ [_webView _setTextIndicator:*indicator withLifetime:TextIndicatorLifetime::Permanent];
} interactionStoppedHandler:^() {
[_webView _clearTextIndicatorWithAnimation:TextIndicatorDismissalAnimation::FadeOut];
}];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes