Don't prevent AppSleep from sync messages.
authorslewis@apple.com <slewis@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Mar 2014 01:15:50 +0000 (01:15 +0000)
committerslewis@apple.com <slewis@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Mar 2014 01:15:50 +0000 (01:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130747.

Reviewed by Anders Carlsson.

We think sync messages only need to happen full throttle when the plugin is visible,
the user is interacting with the plugin, or audio is playing.  Since we already
take assertions for all these cases the assertion in sync messages doesn’t provide
any value.  Since it can keep the PluginProcess awake in other instances remove it.

* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didReceiveSyncMessage):

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

Source/WebKit2/ChangeLog
Source/WebKit2/PluginProcess/WebProcessConnection.cpp

index 345e0c0..8386c91 100644 (file)
@@ -1,5 +1,20 @@
 2014-03-28  Stephanie Lewis  <slewis@apple.com>
 
+        Don't prevent AppSleep from sync messages.
+        https://bugs.webkit.org/show_bug.cgi?id=130747.
+
+        Reviewed by Anders Carlsson.
+
+        We think sync messages only need to happen full throttle when the plugin is visible,
+        the user is interacting with the plugin, or audio is playing.  Since we already
+        take assertions for all these cases the assertion in sync messages doesn’t provide
+        any value.  Since it can keep the PluginProcess awake in other instances remove it.
+
+        * PluginProcess/WebProcessConnection.cpp:
+        (WebKit::WebProcessConnection::didReceiveSyncMessage):
+
+2014-03-28  Stephanie Lewis  <slewis@apple.com>
+
         Stop waking up the web process in the background because of plugin activity.
         Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
 
index 9913a21..fe841e0 100644 (file)
@@ -144,9 +144,6 @@ void WebProcessConnection::didReceiveMessage(IPC::Connection* connection, IPC::M
 
 void WebProcessConnection::didReceiveSyncMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder, std::unique_ptr<IPC::MessageEncoder>& replyEncoder)
 {
-    // Force all timers to run at full speed when processing a synchronous message
-    ActivityAssertion activityAssertion(PluginProcess::shared().connectionActivity());
-
     ConnectionStack::CurrentConnectionPusher currentConnection(ConnectionStack::shared(), connection);
 
     uint64_t destinationID = decoder.destinationID();