Crash child processes if they receive an invalid message
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Feb 2017 21:49:54 +0000 (21:49 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Feb 2017 21:49:54 +0000 (21:49 +0000)
commit654fb77da1f801170f0f393e9553acae1dbf410f
treeea1096804354294bb45c24062b020f1e075c19b9
parent8045becb162287e1126a98c2428a7d6e860c1b16
Crash child processes if they receive an invalid message
https://bugs.webkit.org/show_bug.cgi?id=167900

Reviewed by Dan Bernstein.

Previously, some processes would try to gracefully exit, others would just drop messages leading to weird bugs.
Instead, set app-specific crash information to the message that failed to be decoded, and then crash.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::didReceiveInvalidMessage): Deleted.
* DatabaseProcess/DatabaseProcess.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveInvalidMessage): Deleted.
* NetworkProcess/NetworkProcess.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::didReceiveInvalidMessage): Deleted.
* PluginProcess/PluginProcess.h:
* Shared/ChildProcess.h:
* Shared/Cocoa/ChildProcessCocoa.mm: Added.
(WebKit::ChildProcess::didReceiveInvalidMessage):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveInvalidMessage): Deleted.
* WebProcess/WebProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
Source/WebKit2/DatabaseProcess/DatabaseProcess.h
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/PluginProcess/PluginProcess.cpp
Source/WebKit2/PluginProcess/PluginProcess.h
Source/WebKit2/Shared/ChildProcess.cpp
Source/WebKit2/Shared/ChildProcess.h
Source/WebKit2/Shared/Cocoa/ChildProcessCocoa.mm [new file with mode: 0644]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h