 +  return NULL;
 +}
 +
- static void childSetupFunction(gpointer userData)
++
++
+ void ProcessLauncher::launchProcess()
  {
-     int socket = GPOINTER_TO_INT(userData);
-@@ -138,8 +284,20 @@
-     argv[i++] = nullptr;
- 
-     GUniqueOutPtr<GError> error;
--    if (!g_spawn_async(nullptr, argv, nullptr, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, childSetupFunction, GINT_TO_POINTER(socketPair.server), &pid, &error.outPtr()))
--        g_error("Unable to fork a new child process: %s", error->message);
-+
-+    if(m_launchOptions.processType == ProcessLauncher::ProcessType::Web) {
-+      if (!g_spawn_async(nullptr, argv, nullptr, GSpawnFlags(G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_DO_NOT_REAP_CHILD), childSetupFunction, GINT_TO_POINTER(socketPair.server), &pid, &error.outPtr())) {
-+          g_printerr("Unable to fork a new WebProcess: %s.\n", error->message);
-+          ASSERT_NOT_REACHED();
-+      }
-+      pthread_t thread_id;
-+      pthread_create(&thread_id, NULL, wait_thread, (void *)pid);
-+    } else {
-+      if (!g_spawn_async(nullptr, argv, nullptr, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, childSetupFunction, GINT_TO_POINTER(socketPair.server), &pid, &error.outPtr())) {
-+          g_printerr("Unable to fork a new WebProcess: %s.\n", error->message);
-+          ASSERT_NOT_REACHED();
-+      }
-+    }
- 
+     IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection(IPC::Connection::ConnectionOptions::SetCloexecOnServer);
+@@ -170,6 +317,12 @@ void ProcessLauncher::launchProcess()
+     m_processIdentifier = g_ascii_strtoll(processIdStr, nullptr, 0);
+     RELEASE_ASSERT(m_processIdentifier);
+ 
++    pthread_t thread_id;
++    int retval = pthread_create(&thread_id, NULL, wait_thread, (void *)m_processIdentifier);
++    if (retval != 0) {
++      g_error("[webkitfuzz]: pthread_create failed\n");
++    }
++
      // Don't expose the parent socket to potential future children.
      if (!setCloseOnExec(socketPair.client))
-diff -ruN webkitgtk-2.20.2-original/Tools/CMakeLists.txt webkitgtk-2.20.2-patched/Tools/CMakeLists.txt
---- webkitgtk-2.20.2-original/Tools/CMakeLists.txt	2018-02-18 23:45:33.000000000 -0800
-+++ webkitgtk-2.20.2-patched/Tools/CMakeLists.txt	2018-06-07 08:57:57.872532000 -0700
-@@ -15,6 +15,9 @@
-     if (ENABLE_MINIBROWSER)
-         add_subdirectory(MiniBrowser/gtk)
-     endif ()
-+
-+    add_subdirectory(webkitfuzz)
-+
- elseif ("${PORT}" STREQUAL "Mac")
-     add_subdirectory(DumpRenderTree)
-     add_subdirectory(WebKitTestRunner)
-diff -ruN webkitgtk-2.20.2-original/Tools/webkitfuzz/CMakeLists.txt webkitgtk-2.20.2-patched/Tools/webkitfuzz/CMakeLists.txt
---- webkitgtk-2.20.2-original/Tools/webkitfuzz/CMakeLists.txt	1969-12-31 16:00:00.000000000 -0800
-+++ webkitgtk-2.20.2-patched/Tools/webkitfuzz/CMakeLists.txt	2017-12-13 06:42:56.968691000 -0800
+         RELEASE_ASSERT_NOT_REACHED();
+diff --git a/Tools/PlatformGTK.cmake b/Tools/PlatformGTK.cmake
+index 37e1b0b7138d..5b9579597912 100644
+--- a/Tools/PlatformGTK.cmake
++++ b/Tools/PlatformGTK.cmake
+@@ -12,3 +12,5 @@ endif ()
+ if (ENABLE_MINIBROWSER)
+   add_subdirectory(MiniBrowser/gtk)
+ endif ()
++
++add_subdirectory(webkitfuzz)
+diff --git a/Tools/webkitfuzz/CMakeLists.txt b/Tools/webkitfuzz/CMakeLists.txt
+new file mode 100644
+index 000000000000..d71e14610257
+--- /dev/null
++++ b/Tools/webkitfuzz/CMakeLists.txt
 @@ -0,0 +1,40 @@
 +set(WEBKITFUZZ_DIR "${TOOLS_DIR}/webkitfuzz")
 +

+
+  free(log_path);
+
+  FILE *f_src = fopen(src_path, "rb");
+  if (f_src == NULL) {
+    fprintf(stdout, "error: %s not found\n", src_path);
+    return;

diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index 546b4a4ddeeb..13852bcb263f 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -27,6 +27,8 @@
 #include "config.h"
 #include "DOMWindow.h"
