WKNavigation.AutomaticViewReloadAfterWebProcessCrash asserts after r238538
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 23:20:25 +0000 (23:20 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 23:20:25 +0000 (23:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192038
<rdar://problem/46288457>

Reviewed by Wenson Hsieh.

* UIProcess/WebPageProxy.cpp:
(WebKit::m_resetRecentCrashCountTimer):
(WebKit::WebPageProxy::finishAttachingToWebProcess):
(WebKit::WebPageProxy::resetState):
(WebKit::m_editableImageController): Deleted.
Properly invalidate m_editableImageController when resetting WebPageProxy.
Otherwise, the MessageReceiverMaps get invalidated, then later when
EditableImageController goes away we assert trying to remove the receiver.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238580 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.cpp

index db82f96..5e10d09 100644 (file)
@@ -1,3 +1,20 @@
+2018-11-27  Tim Horton  <timothy_horton@apple.com>
+
+        WKNavigation.AutomaticViewReloadAfterWebProcessCrash asserts after r238538
+        https://bugs.webkit.org/show_bug.cgi?id=192038
+        <rdar://problem/46288457>
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::m_resetRecentCrashCountTimer):
+        (WebKit::WebPageProxy::finishAttachingToWebProcess):
+        (WebKit::WebPageProxy::resetState):
+        (WebKit::m_editableImageController): Deleted.
+        Properly invalidate m_editableImageController when resetting WebPageProxy.
+        Otherwise, the MessageReceiverMaps get invalidated, then later when
+        EditableImageController goes away we assert trying to remove the receiver.
+
 2018-11-27  Jiewen Tan  <jiewen_tan@apple.com>
 
         (r238246) [ MacOS Debug ] Layout Test http/wpt/webauthn/ctap-hid-failure.https.html is Crashing
index 75c3a9b..1c16dd9 100644 (file)
@@ -837,6 +837,10 @@ void WebPageProxy::finishAttachingToWebProcess(ShouldDelayAttachingDrawingArea s
     m_credentialsMessenger = std::make_unique<WebAuthenticatorCoordinatorProxy>(*this);
 #endif
 
+#if HAVE(PENCILKIT)
+    m_editableImageController = std::make_unique<EditableImageController>(*this);
+#endif
+
     initializeWebPage(shouldDelayAttachingDrawingArea);
 
     m_inspector->updateForNewPageProcess(this);
@@ -6361,6 +6365,10 @@ void WebPageProxy::resetState(ResetStateReason resetStateReason)
     m_credentialsMessenger = nullptr;
 #endif
 
+#if HAVE(PENCILKIT)
+    m_editableImageController = nullptr;
+#endif
+
     CallbackBase::Error error;
     switch (resetStateReason) {
     case ResetStateReason::NavigationSwap: