[UNIX] Initialize WebKit before the platform initializations
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2016 08:31:11 +0000 (08:31 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2016 08:31:11 +0000 (08:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=156622

Reviewed by Michael Catanzaro.

The platform specific initialization might use something that would require WebKit2 to be initialized. For
example, in debug mode, the GTK+ port uses WTF::sleep that requires the threading to be initialized.

* Shared/unix/ChildProcessMain.h:
(WebKit::ChildProcessMain): Move InitializeWebKit2() before platformInitialize().

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

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/unix/ChildProcessMain.h

index b873d8c..dd43c9b 100644 (file)
@@ -1,3 +1,16 @@
+2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [UNIX] Initialize WebKit before the platform initializations
+        https://bugs.webkit.org/show_bug.cgi?id=156622
+
+        Reviewed by Michael Catanzaro.
+
+        The platform specific initialization might use something that would require WebKit2 to be initialized. For
+        example, in debug mode, the GTK+ port uses WTF::sleep that requires the threading to be initialized.
+
+        * Shared/unix/ChildProcessMain.h:
+        (WebKit::ChildProcessMain): Move InitializeWebKit2() before platformInitialize().
+
 2016-04-18  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>
 
         Fix incorrect assumption that APPLE implies Mac.
index 7b90294..accc764 100644 (file)
@@ -49,11 +49,11 @@ int ChildProcessMain(int argc, char** argv)
 {
     ChildProcessMainType childMain;
 
+    InitializeWebKit2();
+
     if (!childMain.platformInitialize())
         return EXIT_FAILURE;
 
-    InitializeWebKit2();
-
     if (!childMain.parseCommandLine(argc, argv))
         return EXIT_FAILURE;