Title: [164015] trunk/Source/WebKit2
- Revision
- 164015
- Author
- [email protected]
- Date
- 2014-02-12 22:04:36 -0800 (Wed, 12 Feb 2014)
Log Message
Return immediately from DestroyPlugin IPC call
https://bugs.webkit.org/show_bug.cgi?id=128712
Reviewed by Anders Carlsson.
In some cases we spend a lot of time waiting for synchronous IPC for plugin termination to complete. Reduce
the delay by returning from IPC immediately when the plugin process receives it. Just using asynchrounous
IPC might introduce undesirable arbitrary delay between the IPC call returning and the destruction actually
starting.
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::destroyPlugin):
* PluginProcess/WebProcessConnection.h:
* PluginProcess/WebProcessConnection.messages.in:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (164014 => 164015)
--- trunk/Source/WebKit2/ChangeLog 2014-02-13 05:52:35 UTC (rev 164014)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-13 06:04:36 UTC (rev 164015)
@@ -1,3 +1,20 @@
+2014-02-12 Antti Koivisto <[email protected]>
+
+ Return immediately from DestroyPlugin IPC call
+ https://bugs.webkit.org/show_bug.cgi?id=128712
+
+ Reviewed by Anders Carlsson.
+
+ In some cases we spend a lot of time waiting for synchronous IPC for plugin termination to complete. Reduce
+ the delay by returning from IPC immediately when the plugin process receives it. Just using asynchrounous
+ IPC might introduce undesirable arbitrary delay between the IPC call returning and the destruction actually
+ starting.
+
+ * PluginProcess/WebProcessConnection.cpp:
+ (WebKit::WebProcessConnection::destroyPlugin):
+ * PluginProcess/WebProcessConnection.h:
+ * PluginProcess/WebProcessConnection.messages.in:
+
2014-02-12 Anders Carlsson <[email protected]>
Pass the related page in the WebPageConfiguration struct
Modified: trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp (164014 => 164015)
--- trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp 2014-02-13 05:52:35 UTC (rev 164014)
+++ trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp 2014-02-13 06:04:36 UTC (rev 164015)
@@ -178,8 +178,12 @@
destroyPluginControllerProxy(pluginControllers[i]);
}
-void WebProcessConnection::destroyPlugin(uint64_t pluginInstanceID, bool asynchronousCreationIncomplete)
+void WebProcessConnection::destroyPlugin(uint64_t pluginInstanceID, bool asynchronousCreationIncomplete, PassRefPtr<Messages::WebProcessConnection::DestroyPlugin::DelayedReply> reply)
{
+ // We return immediately from this synchronous IPC. We want to make sure the plugin destruction is just about to start so audio playback
+ // will finish soon after returning. However we don't want to wait for destruction to complete fully as that may take a while.
+ reply->send();
+
// Ensure we don't clamp any timers during destruction
ActivityAssertion activityAssertion(PluginProcess::shared().connectionActivity());
Modified: trunk/Source/WebKit2/PluginProcess/WebProcessConnection.h (164014 => 164015)
--- trunk/Source/WebKit2/PluginProcess/WebProcessConnection.h 2014-02-13 05:52:35 UTC (rev 164014)
+++ trunk/Source/WebKit2/PluginProcess/WebProcessConnection.h 2014-02-13 06:04:36 UTC (rev 164015)
@@ -72,7 +72,7 @@
void didReceiveSyncWebProcessConnectionMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
void createPlugin(const PluginCreationParameters&, PassRefPtr<Messages::WebProcessConnection::CreatePlugin::DelayedReply>);
void createPluginAsynchronously(const PluginCreationParameters&);
- void destroyPlugin(uint64_t pluginInstanceID, bool asynchronousCreationIncomplete);
+ void destroyPlugin(uint64_t pluginInstanceID, bool asynchronousCreationIncomplete, PassRefPtr<Messages::WebProcessConnection::DestroyPlugin::DelayedReply>);
void createPluginInternal(const PluginCreationParameters&, bool& result, bool& wantsWheelEvents, uint32_t& remoteLayerClientID);
Modified: trunk/Source/WebKit2/PluginProcess/WebProcessConnection.messages.in (164014 => 164015)
--- trunk/Source/WebKit2/PluginProcess/WebProcessConnection.messages.in 2014-02-13 05:52:35 UTC (rev 164014)
+++ trunk/Source/WebKit2/PluginProcess/WebProcessConnection.messages.in 2014-02-13 06:04:36 UTC (rev 164015)
@@ -30,7 +30,7 @@
CreatePluginAsynchronously(WebKit::PluginCreationParameters pluginCreationParameters)
# Destroys the plug-in instance with the given instance ID.
- DestroyPlugin(uint64_t pluginInstanceID, bool asynchronousCreationIncomplete) -> ()
+ DestroyPlugin(uint64_t pluginInstanceID, bool asynchronousCreationIncomplete) -> () Delayed
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes