Title: [234067] trunk/Source/WebKit
Revision
234067
Author
[email protected]
Date
2018-07-20 14:28:02 -0700 (Fri, 20 Jul 2018)

Log Message

Occasional crash under -[WKFormInputSession setSuggestions:]
https://bugs.webkit.org/show_bug.cgi?id=187869
<rdar://problem/41357063>

Reviewed by Dean Jackson.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputDelegate]):
Make inputDelegate weak.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (234066 => 234067)


--- trunk/Source/WebKit/ChangeLog	2018-07-20 21:25:19 UTC (rev 234066)
+++ trunk/Source/WebKit/ChangeLog	2018-07-20 21:28:02 UTC (rev 234067)
@@ -1,3 +1,16 @@
+2018-07-20  Tim Horton  <[email protected]>
+
+        Occasional crash under -[WKFormInputSession setSuggestions:]
+        https://bugs.webkit.org/show_bug.cgi?id=187869
+        <rdar://problem/41357063>
+
+        Reviewed by Dean Jackson.
+
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView inputDelegate]):
+        Make inputDelegate weak.
+
 2018-07-20  Brent Fulgham  <[email protected]>
 
         [macOS] Relax WebKit sandbox to permit proper App Store behavior

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (234066 => 234067)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2018-07-20 21:25:19 UTC (rev 234066)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2018-07-20 21:28:02 UTC (rev 234067)
@@ -44,6 +44,7 @@
 #import <wtf/BlockPtr.h>
 #import <wtf/Forward.h>
 #import <wtf/Vector.h>
+#import <wtf/WeakObjCPtr.h>
 #import <wtf/text/WTFString.h>
 
 namespace API {
@@ -182,7 +183,7 @@
 
     std::unique_ptr<WebKit::SmartMagnificationController> _smartMagnificationController;
 
-    id <UITextInputDelegate> _inputDelegate;
+    WeakObjCPtr<id <UITextInputDelegate>> _inputDelegate;
 
     uint64_t _latestTapID;
     struct TapHighlightInformation {

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (234066 => 234067)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-07-20 21:25:19 UTC (rev 234066)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2018-07-20 21:28:02 UTC (rev 234067)
@@ -899,7 +899,7 @@
 
 - (id <UITextInputDelegate>)inputDelegate
 {
-    return _inputDelegate;
+    return _inputDelegate.getAutoreleased();
 }
 
 - (CGPoint)lastInteractionLocation
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to