summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/chromium/src/base/process_util_win.cc27
-rw-r--r--ipc/glue/BackgroundChildImpl.cpp1
-rw-r--r--ipc/glue/BackgroundUtils.cpp13
-rw-r--r--ipc/glue/GeckoChildProcessHost.cpp5
-rw-r--r--ipc/glue/MessageChannel.cpp21
-rw-r--r--ipc/glue/moz.build1
6 files changed, 37 insertions, 31 deletions
diff --git a/ipc/chromium/src/base/process_util_win.cc b/ipc/chromium/src/base/process_util_win.cc
index f22f7216f..fa9b86ace 100644
--- a/ipc/chromium/src/base/process_util_win.cc
+++ b/ipc/chromium/src/base/process_util_win.cc
@@ -298,6 +298,33 @@ bool LaunchApp(const std::wstring& cmdline,
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList = NULL;
+ // setup our handle array first - if we end up with no handles that can
+ // be inherited we can avoid trying to do the ThreadAttributeList dance...
+ HANDLE handlesToInherit[2];
+ int handleCount = 0;
+ HANDLE stdOut = ::GetStdHandle(STD_OUTPUT_HANDLE);
+ HANDLE stdErr = ::GetStdHandle(STD_ERROR_HANDLE);
+
+ if (IsInheritableHandle(stdOut))
+ handlesToInherit[handleCount++] = stdOut;
+ if (stdErr != stdOut && IsInheritableHandle(stdErr))
+ handlesToInherit[handleCount++] = stdErr;
+
+ if (handleCount) {
+ lpAttributeList = CreateThreadAttributeList(handlesToInherit, handleCount);
+ if (lpAttributeList) {
+ // it's safe to inherit handles, so arrange for that...
+ startup_info.cb = sizeof(startup_info_ex);
+ startup_info.dwFlags |= STARTF_USESTDHANDLES;
+ startup_info.hStdOutput = stdOut;
+ startup_info.hStdError = stdErr;
+ startup_info.hStdInput = INVALID_HANDLE_VALUE;
+ startup_info_ex.lpAttributeList = lpAttributeList;
+ dwCreationFlags |= EXTENDED_STARTUPINFO_PRESENT;
+ bInheritHandles = TRUE;
+ }
+ }
+
PROCESS_INFORMATION process_info;
BOOL createdOK = CreateProcess(NULL,
const_cast<wchar_t*>(cmdline.c_str()), NULL, NULL,
diff --git a/ipc/glue/BackgroundChildImpl.cpp b/ipc/glue/BackgroundChildImpl.cpp
index b157048a4..a129069bc 100644
--- a/ipc/glue/BackgroundChildImpl.cpp
+++ b/ipc/glue/BackgroundChildImpl.cpp
@@ -312,6 +312,7 @@ BackgroundChildImpl::DeallocPCamerasChild(camera::PCamerasChild *aActor)
RefPtr<camera::CamerasChild> child =
dont_AddRef(static_cast<camera::CamerasChild*>(aActor));
MOZ_ASSERT(aActor);
+ camera::Shutdown();
#endif
return true;
}
diff --git a/ipc/glue/BackgroundUtils.cpp b/ipc/glue/BackgroundUtils.cpp
index 44f988efd..6f7501f70 100644
--- a/ipc/glue/BackgroundUtils.cpp
+++ b/ipc/glue/BackgroundUtils.cpp
@@ -295,7 +295,8 @@ LoadInfoToLoadInfoArgs(nsILoadInfo *aLoadInfo,
aLoadInfo->CorsUnsafeHeaders(),
aLoadInfo->GetForcePreflight(),
aLoadInfo->GetIsPreflight(),
- aLoadInfo->GetLoadTriggeredFromExternal()
+ aLoadInfo->GetLoadTriggeredFromExternal(),
+ aLoadInfo->GetIsFromProcessingFrameAttributes()
);
return NS_OK;
@@ -347,7 +348,7 @@ LoadInfoArgsToLoadInfo(const OptionalLoadInfoArgs& aOptionalLoadInfoArgs,
redirectChain.AppendElement(redirectedPrincipal.forget());
}
- nsCOMPtr<nsILoadInfo> loadInfo =
+ RefPtr<mozilla::LoadInfo> loadInfo =
new mozilla::LoadInfo(loadingPrincipal,
triggeringPrincipal,
principalToInherit,
@@ -375,8 +376,12 @@ LoadInfoArgsToLoadInfo(const OptionalLoadInfoArgs& aOptionalLoadInfoArgs,
loadInfoArgs.loadTriggeredFromExternal()
);
- loadInfo.forget(outLoadInfo);
- return NS_OK;
+ if (loadInfoArgs.isFromProcessingFrameAttributes()) {
+ loadInfo->SetIsFromProcessingFrameAttributes();
+ }
+
+ loadInfo.forget(outLoadInfo);
+ return NS_OK;
}
} // namespace ipc
diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp
index e58408e0c..fee429238 100644
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -23,8 +23,6 @@
#include "prenv.h"
#include "nsXPCOMPrivate.h"
-#include "nsExceptionHandler.h"
-
#include "nsDirectoryServiceDefs.h"
#include "nsIFile.h"
#include "nsPrintfCString.h"
@@ -32,7 +30,6 @@
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/ipc/BrowserProcessSubThread.h"
#include "mozilla/Omnijar.h"
-#include "mozilla/Telemetry.h"
#include "ProtocolUtils.h"
#include <sys/stat.h>
@@ -534,8 +531,6 @@ GeckoChildProcessHost::RunPerformAsyncLaunch(std::vector<std::string> aExtraOpts
lock.Notify();
CHROMIUM_LOG(ERROR) << "Failed to launch " <<
XRE_ChildProcessTypeToString(mProcessType) << " subprocess";
- Telemetry::Accumulate(Telemetry::SUBPROCESS_LAUNCH_FAILURE,
- nsDependentCString(XRE_ChildProcessTypeToString(mProcessType)));
}
return ok;
}
diff --git a/ipc/glue/MessageChannel.cpp b/ipc/glue/MessageChannel.cpp
index 7861f3e2d..eacb3041b 100644
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -15,7 +15,6 @@
#include "mozilla/Move.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Sprintf.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/Logging.h"
#include "nsAutoPtr.h"
#include "nsDebug.h"
@@ -116,8 +115,6 @@ static MessageChannel* gParentProcessBlocker;
namespace mozilla {
namespace ipc {
-static const uint32_t kMinTelemetryMessageSize = 8192;
-
const int32_t MessageChannel::kNoTimeout = INT32_MIN;
// static
@@ -760,11 +757,6 @@ MessageChannel::Echo(Message* aMsg)
bool
MessageChannel::Send(Message* aMsg)
{
- if (aMsg->size() >= kMinTelemetryMessageSize) {
- Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE,
- nsDependentCString(aMsg->name()), aMsg->size());
- }
-
MOZ_RELEASE_ASSERT(!aMsg->is_sync());
MOZ_RELEASE_ASSERT(aMsg->nested_level() != IPC::Message::NESTED_INSIDE_SYNC);
@@ -1059,11 +1051,6 @@ MessageChannel::ProcessPendingRequests(AutoEnterTransaction& aTransaction)
bool
MessageChannel::Send(Message* aMsg, Message* aReply)
{
- if (aMsg->size() >= kMinTelemetryMessageSize) {
- Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE,
- nsDependentCString(aMsg->name()), aMsg->size());
- }
-
nsAutoPtr<Message> msg(aMsg);
// Sanity checks.
@@ -1160,9 +1147,6 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
IPC_LOG("Send seqno=%d, xid=%d", seqno, transaction);
- // msg will be destroyed soon, but name() is not owned by msg.
- const char* msgName = msg->name();
-
mLink->SendMessage(msg.forget());
while (true) {
@@ -1249,10 +1233,6 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
MOZ_RELEASE_ASSERT(reply->is_sync());
*aReply = Move(*reply);
- if (aReply->size() >= kMinTelemetryMessageSize) {
- Telemetry::Accumulate(Telemetry::IPC_REPLY_SIZE,
- nsDependentCString(msgName), aReply->size());
- }
return true;
}
@@ -2546,7 +2526,6 @@ void
CancelCPOWs()
{
if (gParentProcessBlocker) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::IPC_TRANSACTION_CANCEL, true);
gParentProcessBlocker->CancelCurrentTransaction();
}
}
diff --git a/ipc/glue/moz.build b/ipc/glue/moz.build
index d0d9f9937..85d7f8fa0 100644
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -177,7 +177,6 @@ IPDL_SOURCES = [
LOCAL_INCLUDES += [
'/dom/ipc',
- '/toolkit/crashreporter',
'/toolkit/xre',
'/xpcom/threads',
]