Skip to content

Commit 84c93d2

Browse files
browser(webkit): plumb stderr from the web process to the main process (#792)
This allows `fprintf(stderr, "my message\n")` and `WTFReportBacktrace()` to work from the web process in Windows! JoelEinbinder/webkit@ea530a6
1 parent ef1d2fb commit 84c93d2

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

browser_patches/webkit/BUILD_NUMBER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1130
1+
1131

browser_patches/webkit/patches/bootstrap.diff

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8237,6 +8237,23 @@ index 0000000000000000000000000000000000000000..f356c613945fd263889bc74166bef2b2
82378237
+};
82388238
+
82398239
+} // namespace WebKit
8240+
diff --git a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
8241+
index 8a871bf2916d5eab86becf5fde0faed79283d88c..a19a429c4d53edf81c3028c7053265e6c22c171a 100644
8242+
--- a/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
8243+
+++ b/Source/WebKit/UIProcess/Launcher/win/ProcessLauncherWin.cpp
8244+
@@ -92,8 +92,11 @@ void ProcessLauncher::launchProcess()
8245+
8246+
STARTUPINFO startupInfo { };
8247+
startupInfo.cb = sizeof(startupInfo);
8248+
- startupInfo.dwFlags = STARTF_USESHOWWINDOW;
8249+
+ startupInfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
8250+
startupInfo.wShowWindow = SW_HIDE;
8251+
+ startupInfo.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE);
8252+
+ startupInfo.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE);
8253+
+ startupInfo.hStdError = ::GetStdHandle(STD_ERROR_HANDLE);
8254+
PROCESS_INFORMATION processInformation { };
8255+
BOOL result = ::CreateProcess(0, commandLine.data(), 0, 0, true, 0, 0, 0, &startupInfo, &processInformation);
8256+
82408257
diff --git a/Source/WebKit/UIProcess/RemoteInspectorPipe.cpp b/Source/WebKit/UIProcess/RemoteInspectorPipe.cpp
82418258
new file mode 100644
82428259
index 0000000000000000000000000000000000000000..0b4ec2de5671723f4045e98b3e398fc11180b3b8

0 commit comments

Comments
 (0)