Title: [279419] branches/safari-612.1.21-branch/Source/WebKit
Revision
279419
Author
[email protected]
Date
2021-06-30 09:43:38 -0700 (Wed, 30 Jun 2021)

Log Message

Cherry-pick r279411. rdar://problem/79970312

    Unreviewed, reverting r279155.

    Caused a PLT5 regression

    Reverted changeset:

    "[macOS] Suspend WebProcesses that are in the process cache"
    https://bugs.webkit.org/show_bug.cgi?id=227269
    https://commits.webkit.org/r279155

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

Modified Paths

Diff

Modified: branches/safari-612.1.21-branch/Source/WebKit/ChangeLog (279418 => 279419)


--- branches/safari-612.1.21-branch/Source/WebKit/ChangeLog	2021-06-30 16:43:35 UTC (rev 279418)
+++ branches/safari-612.1.21-branch/Source/WebKit/ChangeLog	2021-06-30 16:43:38 UTC (rev 279419)
@@ -1,3 +1,31 @@
+2021-06-30  Alan Coon  <[email protected]>
+
+        Cherry-pick r279411. rdar://problem/79970312
+
+    Unreviewed, reverting r279155.
+    
+    Caused a PLT5 regression
+    
+    Reverted changeset:
+    
+    "[macOS] Suspend WebProcesses that are in the process cache"
+    https://bugs.webkit.org/show_bug.cgi?id=227269
+    https://commits.webkit.org/r279155
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-06-30  Chris Dumez  <[email protected]>
+
+            Unreviewed, reverting r279155.
+
+            Caused a PLT5 regression
+
+            Reverted changeset:
+
+            "[macOS] Suspend WebProcesses that are in the process cache"
+            https://bugs.webkit.org/show_bug.cgi?id=227269
+            https://commits.webkit.org/r279155
+
 2021-06-29  Alan Coon  <[email protected]>
 
         Cherry-pick r279361. rdar://problem/79923766

Modified: branches/safari-612.1.21-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp (279418 => 279419)


--- branches/safari-612.1.21-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp	2021-06-30 16:43:35 UTC (rev 279418)
+++ branches/safari-612.1.21-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp	2021-06-30 16:43:38 UTC (rev 279419)
@@ -289,14 +289,8 @@
     ASSERT(m_isInProcessCache != value);
     m_isInProcessCache = value;
 
-    if (!m_isInProcessCache)
-        platformResumeProcess();
+    send(Messages::WebProcess::SetIsInProcessCache(m_isInProcessCache), 0);
 
-    sendWithAsyncReply(Messages::WebProcess::SetIsInProcessCache(m_isInProcessCache), [weakThis = makeWeakPtr(*this), isEnteringProcessCache = value]() mutable {
-        if (isEnteringProcessCache && weakThis && weakThis->m_isInProcessCache)
-            weakThis->platformSuspendProcess();
-    });
-
     if (m_isInProcessCache) {
         // WebProcessProxy objects normally keep the process pool alive but we do not want this to be the case
         // for cached processes or it would leak the pool.
@@ -2009,16 +2003,6 @@
     PAL::systemBeep();
 }
 
-#if !PLATFORM(MAC)
-void WebProcessProxy::platformSuspendProcess()
-{
-}
-
-void WebProcessProxy::platformResumeProcess()
-{
-}
-#endif
-
 } // namespace WebKit
 
 #undef MESSAGE_CHECK

Modified: branches/safari-612.1.21-branch/Source/WebKit/UIProcess/WebProcessProxy.h (279418 => 279419)


--- branches/safari-612.1.21-branch/Source/WebKit/UIProcess/WebProcessProxy.h	2021-06-30 16:43:35 UTC (rev 279418)
+++ branches/safari-612.1.21-branch/Source/WebKit/UIProcess/WebProcessProxy.h	2021-06-30 16:43:38 UTC (rev 279419)
@@ -471,9 +471,6 @@
 
     void processDidTerminateOrFailedToLaunch(ProcessTerminationReason);
 
-    void platformSuspendProcess();
-    void platformResumeProcess();
-
     // IPC::Connection::Client
     friend class WebConnectionToWebProcess;
     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;

Modified: branches/safari-612.1.21-branch/Source/WebKit/UIProcess/mac/WebProcessProxyMac.mm (279418 => 279419)


--- branches/safari-612.1.21-branch/Source/WebKit/UIProcess/mac/WebProcessProxyMac.mm	2021-06-30 16:43:35 UTC (rev 279418)
+++ branches/safari-612.1.21-branch/Source/WebKit/UIProcess/mac/WebProcessProxyMac.mm	2021-06-30 16:43:38 UTC (rev 279419)
@@ -31,7 +31,6 @@
 
 #import "WKFullKeyboardAccessWatcher.h"
 #import <Kernel/kern/cs_blobs.h>
-#import <signal.h>
 #import <wtf/ProcessPrivilege.h>
 #import <wtf/spi/cocoa/SecuritySPI.h>
 
@@ -79,24 +78,6 @@
     processPool().setDisplayLinkPreferredFramesPerSecond(*connection(), observerID, displayID, preferredFramesPerSecond);
 }
 
-void WebProcessProxy::platformSuspendProcess()
-{
-    RELEASE_LOG(Process, "%p - [PID=%i] WebProcessProxy::platformSuspendProcess", this, processIdentifier());
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    if (auto* connection = this->connection())
-        xpc_connection_kill(connection->xpcConnection(), SIGSTOP);
-    ALLOW_DEPRECATED_DECLARATIONS_END
-}
-
-void WebProcessProxy::platformResumeProcess()
-{
-    RELEASE_LOG(Process, "%p - [PID=%i] WebProcessProxy::platformResumeProcess", this, processIdentifier());
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
-    if (auto* connection = this->connection())
-        xpc_connection_kill(connection->xpcConnection(), SIGCONT);
-    ALLOW_DEPRECATED_DECLARATIONS_END
-}
-
 } // namespace WebKit
 
 #endif // PLATFORM(MAC)

Modified: branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.cpp (279418 => 279419)


--- branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.cpp	2021-06-30 16:43:35 UTC (rev 279418)
+++ branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.cpp	2021-06-30 16:43:38 UTC (rev 279419)
@@ -614,7 +614,7 @@
     m_hasSuspendedPageProxy = hasSuspendedPageProxy;
 }
 
-void WebProcess::setIsInProcessCache(bool isInProcessCache, CompletionHandler<void()>&& completionHandler)
+void WebProcess::setIsInProcessCache(bool isInProcessCache)
 {
 #if PLATFORM(COCOA)
     if (isInProcessCache) {
@@ -629,8 +629,6 @@
 #else
     UNUSED_PARAM(isInProcessCache);
 #endif
-
-    completionHandler();
 }
 
 void WebProcess::markIsNoLongerPrewarmed()

Modified: branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.h (279418 => 279419)


--- branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.h	2021-06-30 16:43:35 UTC (rev 279418)
+++ branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.h	2021-06-30 16:43:38 UTC (rev 279419)
@@ -420,7 +420,7 @@
     void platformTerminate();
 
     void setHasSuspendedPageProxy(bool);
-    void setIsInProcessCache(bool, CompletionHandler<void()>&&);
+    void setIsInProcessCache(bool);
     void markIsNoLongerPrewarmed();
 
     void registerURLSchemeAsEmptyDocument(const String&);

Modified: branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.messages.in (279418 => 279419)


--- branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.messages.in	2021-06-30 16:43:35 UTC (rev 279418)
+++ branches/safari-612.1.21-branch/Source/WebKit/WebProcess/WebProcess.messages.in	2021-06-30 16:43:38 UTC (rev 279419)
@@ -105,7 +105,7 @@
 #endif
 
     SetHasSuspendedPageProxy(bool hasSuspendedPageProxy);
-    SetIsInProcessCache(bool isInProcessCache) -> () Async
+    SetIsInProcessCache(bool isInProcessCache)
     MarkIsNoLongerPrewarmed()
     GetActivePagesOriginsForTesting() -> (Vector<String> activeOrigins) Async
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to