mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 671196: Kill content processes that cause processing errors in the chrome process. r=bsmedberg
This commit is contained in:
parent
54e8134b81
commit
6ec5bd9705
@ -13,6 +13,8 @@
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#include "chrome/common/process_watcher.h"
|
||||
|
||||
#include "CrashReporterParent.h"
|
||||
#include "History.h"
|
||||
#include "IDBFactory.h"
|
||||
@ -332,6 +334,26 @@ ContentParent::OnChannelConnected(int32 pid)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ContentParent::ProcessingError(Result what)
|
||||
{
|
||||
if (MsgDropped == what) {
|
||||
// Messages sent after crashes etc. are not a big deal.
|
||||
return;
|
||||
}
|
||||
// Other errors are big deals. This ensures the process is
|
||||
// eventually killed, but doesn't immediately KILLITWITHFIRE
|
||||
// because we want to get a minidump if possible. After a timeout
|
||||
// though, the process is forceably killed.
|
||||
if (!KillProcess(OtherProcess(), 1, false)) {
|
||||
NS_WARNING("failed to kill subprocess!");
|
||||
}
|
||||
XRE_GetIOMessageLoop()->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableFunction(&ProcessWatcher::EnsureProcessTerminated,
|
||||
OtherProcess(), /*force=*/true));
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void
|
||||
|
@ -262,6 +262,8 @@ private:
|
||||
virtual bool RecvAddFileWatch(const nsString& root);
|
||||
virtual bool RecvRemoveFileWatch(const nsString& root);
|
||||
|
||||
virtual void ProcessingError(Result what) MOZ_OVERRIDE;
|
||||
|
||||
GeckoChildProcessHost* mSubprocess;
|
||||
|
||||
PRInt32 mGeolocationWatchID;
|
||||
|
Loading…
Reference in New Issue
Block a user