Title: [141587] trunk/Source/WebKit2
Revision
141587
Author
commit-qu...@webkit.org
Date
2013-02-01 06:17:49 -0800 (Fri, 01 Feb 2013)

Log Message

Unreviewed, rolling out r141319.
http://trac.webkit.org/changeset/141319
https://bugs.webkit.org/show_bug.cgi?id=108629

This patch is causing the UIProcess to hang on GTK port when
loading plugins (Requested by chris-qBT_laptop on #webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2013-02-01

* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::scanPlugin):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (141586 => 141587)


--- trunk/Source/WebKit2/ChangeLog	2013-02-01 14:12:51 UTC (rev 141586)
+++ trunk/Source/WebKit2/ChangeLog	2013-02-01 14:17:49 UTC (rev 141587)
@@ -1,3 +1,15 @@
+2013-02-01  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r141319.
+        http://trac.webkit.org/changeset/141319
+        https://bugs.webkit.org/show_bug.cgi?id=108629
+
+        This patch is causing the UIProcess to hang on GTK port when
+        loading plugins (Requested by chris-qBT_laptop on #webkit).
+
+        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
+        (WebKit::PluginProcessProxy::scanPlugin):
+
 2013-02-01  Mikhail Pozdnyakov  <mikhail.pozdnya...@intel.com>
 
         [EFL][WK2] EwkContext should be based on C WK2 API

Modified: trunk/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp (141586 => 141587)


--- trunk/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp	2013-02-01 14:12:51 UTC (rev 141586)
+++ trunk/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp	2013-02-01 14:17:49 UTC (rev 141587)
@@ -58,26 +58,6 @@
 {
 }
 
-static bool spawnProcessSync(char** argv, char** standardOutput, char** standardError, int* exitStatus)
-{
-    // If the disposition of SIGCHLD signal is set to SIG_IGN (default) then
-    // the signal will be ignored and g_spawn_sync() will not be able to return
-    // the status. As a consequence, we make sure that the disposition is set
-    // to SIG_DFL before calling g_spawn_sync().
-    struct sigaction defaultAction, oldAction;
-    defaultAction.sa_handler = SIG_DFL;
-    defaultAction.sa_flags = 0;
-    sigemptyset(&defaultAction.sa_mask);
-    sigaction(SIGCHLD, &defaultAction, &oldAction);
-
-    bool success = g_spawn_sync(0, argv, 0, G_SPAWN_STDERR_TO_DEV_NULL, 0, 0, standardOutput, standardError, exitStatus, 0);
-
-    // Restore SIGCHLD signal disposition.
-    sigaction(SIGCHLD, &oldAction, 0);
-
-    return success;
-}
-
 bool PluginProcessProxy::scanPlugin(const String& pluginPath, RawPluginMetaData& result)
 {
 #if PLATFORM(GTK) || PLATFORM(EFL)
@@ -92,8 +72,19 @@
     int status;
     char* stdOut = 0;
 
+    // If the disposition of SIGCLD signal is set to SIG_IGN (default)
+    // then the signal will be ignored and g_spawn_sync() will not be
+    // able to return the status.
+    // As a consequence, we make sure that the disposition is set to
+    // SIG_DFL before calling g_spawn_sync().
+    struct sigaction action;
+    sigaction(SIGCLD, 0, &action);
+    if (action.sa_handler == SIG_IGN) {
+        action.sa_handler = SIG_DFL;
+        sigaction(SIGCLD, &action, 0);
+    }
 
-    if (!spawnProcessSync(argv, &stdOut, 0, &status))
+    if (!g_spawn_sync(0, argv, 0, G_SPAWN_STDERR_TO_DEV_NULL, 0, 0, &stdOut, 0, &status, 0))
         return false;
 
     if (!WIFEXITED(status) || WEXITSTATUS(status) != EXIT_SUCCESS || !stdOut) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to