Bug 529877 - Remove stray printfs in e10s dom/ipc code. r=cjones

This commit is contained in:
Alessio Placitelli 2014-04-13 14:18:02 -04:00
parent beaeb53a80
commit 1f55275fb4
2 changed files with 21 additions and 6 deletions

View File

@ -14,6 +14,7 @@
#include "nsIAppsService.h" #include "nsIAppsService.h"
#include "nsIPrincipal.h" #include "nsIPrincipal.h"
#include "nsIScriptSecurityManager.h" #include "nsIScriptSecurityManager.h"
#include "nsPrintfCString.h"
#include "nsIURI.h" #include "nsIURI.h"
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsServiceManagerUtils.h" #include "nsServiceManagerUtils.h"
@ -115,7 +116,11 @@ AssertAppProcess(PContentParent* aActor,
} }
} }
printf_stderr("Security problem: Content process does not have `%s'. It will be killed.\n", aCapability); NS_ERROR(
nsPrintfCString(
"Security problem: Content process does not have `%s'. It will be killed.\n",
aCapability).get());
static_cast<ContentParent*>(aActor)->KillHard(); static_cast<ContentParent*>(aActor)->KillHard();
return false; return false;
@ -133,7 +138,11 @@ AssertAppStatus(PContentParent* aActor,
} }
} }
printf_stderr("Security problem: Content process does not have `%d' status. It will be killed.\n", aStatus); NS_ERROR(
nsPrintfCString(
"Security problem: Content process does not have `%d' status. It will be killed.",
aStatus).get());
static_cast<ContentParent*>(aActor)->KillHard(); static_cast<ContentParent*>(aActor)->KillHard();
return false; return false;

View File

@ -1984,8 +1984,11 @@ ContentParent::RecvNuwaReady()
{ {
#ifdef MOZ_NUWA_PROCESS #ifdef MOZ_NUWA_PROCESS
if (!IsNuwaProcess()) { if (!IsNuwaProcess()) {
printf_stderr("Terminating child process %d for unauthorized IPC message: " NS_ERROR(
"NuwaReady", Pid()); nsPrintfCString(
"Terminating child process %d for unauthorized IPC message: NuwaReady",
Pid()).get());
KillHard(); KillHard();
return false; return false;
} }
@ -2003,8 +2006,11 @@ ContentParent::RecvAddNewProcess(const uint32_t& aPid,
{ {
#ifdef MOZ_NUWA_PROCESS #ifdef MOZ_NUWA_PROCESS
if (!IsNuwaProcess()) { if (!IsNuwaProcess()) {
printf_stderr("Terminating child process %d for unauthorized IPC message: " NS_ERROR(
"AddNewProcess(%d)", Pid(), aPid); nsPrintfCString(
"Terminating child process %d for unauthorized IPC message: "
"AddNewProcess(%d)", Pid(), aPid).get());
KillHard(); KillHard();
return false; return false;
} }