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

diff -ruN webkitgtk-2.20.2-original/Source/WebCore/page/DOMWindow.cpp webkitgtk-2.20.2-patched/Source/WebCore/page/DOMWindow.cpp
--- webkitgtk-2.20.2-original/Source/WebCore/page/DOMWindow.cpp	2018-02-19 03:04:38.000000000 -0800
+++ webkitgtk-2.20.2-patched/Source/WebCore/page/DOMWindow.cpp	2018-06-07 08:48:13.506202000 -0700
@@ -27,6 +27,8 @@
 #include "config.h"
 #include "DOMWindow.h"

+  return NULL;
+}
+
+
+
 void ProcessLauncher::launchProcess()
 {
     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))
         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")
+
