Delay WebProcess launch until a load is triggered in a Web view
[WebKit-https.git] / Source / WebKit / UIProcess / WebEditCommandProxy.cpp
index 0e64bd7..87b0afc 100644 (file)
@@ -52,7 +52,7 @@ WebEditCommandProxy::~WebEditCommandProxy()
 
 void WebEditCommandProxy::unapply()
 {
-    if (!m_page || !m_page->isValid())
+    if (!m_page || !m_page->hasRunningProcess())
         return;
 
     m_page->process().send(Messages::WebPage::UnapplyEditCommand(m_commandID), m_page->pageID(), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply);
@@ -61,7 +61,7 @@ void WebEditCommandProxy::unapply()
 
 void WebEditCommandProxy::reapply()
 {
-    if (!m_page || !m_page->isValid())
+    if (!m_page || !m_page->hasRunningProcess())
         return;
 
     m_page->process().send(Messages::WebPage::ReapplyEditCommand(m_commandID), m_page->pageID(), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply);