Bug 1310116 - Allow waitpid but warn on creating processes in content. r=jld

MozReview-Commit-ID: JjNfA6wUe3T

--HG--
extra : rebase_source : ad565d238e7554a951d2f6b4e076918bdfd7a450
extra : histedit_source : 127ff408e498f7c687cf6e7f8f7b4e2fbb8c5ae8
This commit is contained in:
Gian-Carlo Pascutto 2016-10-25 20:43:42 +02:00
parent 1539628815
commit 8b0d2992cb
2 changed files with 7 additions and 0 deletions

View File

@ -719,6 +719,9 @@ public:
case __NR_umask: case __NR_umask:
case __NR_kill: case __NR_kill:
case __NR_wait4: case __NR_wait4:
#ifdef __NR_waitpid
case __NR_waitpid:
#endif
#ifdef __NR_arch_prctl #ifdef __NR_arch_prctl
case __NR_arch_prctl: case __NR_arch_prctl:
#endif #endif

View File

@ -23,6 +23,7 @@
#include "nsCRT.h" #include "nsCRT.h"
#include "nsThreadUtils.h" #include "nsThreadUtils.h"
#include "nsIObserverService.h" #include "nsIObserverService.h"
#include "nsXULAppAPI.h"
#include "mozilla/Services.h" #include "mozilla/Services.h"
#include <stdlib.h> #include <stdlib.h>
@ -430,6 +431,9 @@ nsresult
nsProcess::RunProcess(bool aBlocking, char** aMyArgv, nsIObserver* aObserver, nsProcess::RunProcess(bool aBlocking, char** aMyArgv, nsIObserver* aObserver,
bool aHoldWeak, bool aArgsUTF8) bool aHoldWeak, bool aArgsUTF8)
{ {
NS_WARNING_ASSERTION(!XRE_IsContentProcess(),
"No launching of new processes in the content process");
if (NS_WARN_IF(!mExecutable)) { if (NS_WARN_IF(!mExecutable)) {
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
} }