Title: [247436] trunk/Source/WebKit
Revision
247436
Author
wenson_hs...@apple.com
Date
2019-07-15 11:50:29 -0700 (Mon, 15 Jul 2019)

Log Message

REGRESSION: Chase app crashes immediately after authentication
https://bugs.webkit.org/show_bug.cgi?id=199798
<rdar://problem/53106179>

Reviewed by Alex Christensen.

After r247411, we sometimes try to consult `_page` from WKWebView, before WKWebView's `_page` has been set. This
happens under a check for -[WKWebView _isEditable], from within -[WKContentView setupInteraction], which happens
if the host app is not linked on the iOS 12 SDK or earlier. To mitigate this, simply add a null check in
-_isEditable.

There's currently no great way to test this, since we don't have a mechanism for simulating linked-on checks.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isEditable]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (247435 => 247436)


--- trunk/Source/WebKit/ChangeLog	2019-07-15 18:03:04 UTC (rev 247435)
+++ trunk/Source/WebKit/ChangeLog	2019-07-15 18:50:29 UTC (rev 247436)
@@ -1,3 +1,21 @@
+2019-07-15  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        REGRESSION: Chase app crashes immediately after authentication
+        https://bugs.webkit.org/show_bug.cgi?id=199798
+        <rdar://problem/53106179>
+
+        Reviewed by Alex Christensen.
+
+        After r247411, we sometimes try to consult `_page` from WKWebView, before WKWebView's `_page` has been set. This
+        happens under a check for -[WKWebView _isEditable], from within -[WKContentView setupInteraction], which happens
+        if the host app is not linked on the iOS 12 SDK or earlier. To mitigate this, simply add a null check in
+        -_isEditable.
+
+        There's currently no great way to test this, since we don't have a mechanism for simulating linked-on checks.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _isEditable]):
+
 2019-07-13  Andres Gonzalez  <andresg...@apple.com>
 
         Add accessibility support to WKDataListSuggestionsView.

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (247435 => 247436)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-07-15 18:03:04 UTC (rev 247435)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-07-15 18:50:29 UTC (rev 247436)
@@ -4643,7 +4643,7 @@
 
 - (BOOL)_isEditable
 {
-    return _page->isEditable();
+    return _page && _page->isEditable();
 }
 
 - (void)_setEditable:(BOOL)editable
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to