Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8

This both helps IDE integration and will help avoid build issues which would've
otherwise cropped up when adding new files to the directory for bug 1706374.

Differential Revision: https://phabricator.services.mozilla.com/D112764
This commit is contained in:
Nika Layzell 2021-04-22 14:32:03 +00:00
parent 768eac28f5
commit e983da120a
20 changed files with 34 additions and 25 deletions

View File

@ -121,4 +121,5 @@ gfx/wr/
gfx/ycbcr/
hal/
image/
ipc/glue/
netwerk/cache2/

View File

@ -31,15 +31,13 @@
#include "mozilla/dom/CanonicalBrowsingContext.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/WindowGlobalParent.h"
#include "mozilla/LoadInfo.h"
using namespace mozilla::dom;
using namespace mozilla::net;
namespace mozilla {
using mozilla::BasePrincipal;
using mozilla::Maybe;
using mozilla::dom::BrowsingContext;
using mozilla::dom::ServiceWorkerDescriptor;
using namespace mozilla::net;
namespace ipc {
Result<nsCOMPtr<nsIPrincipal>, nsresult> PrincipalInfoToPrincipal(
@ -162,7 +160,6 @@ Result<nsCOMPtr<nsIPrincipal>, nsresult> PrincipalInfoToPrincipal(
default:
return Err(NS_ERROR_FAILURE);
}
return Err(NS_ERROR_FAILURE);
}
already_AddRefed<nsIContentSecurityPolicy> CSPInfoToCSP(
@ -760,7 +757,7 @@ nsresult LoadInfoArgsToLoadInfo(
loadingContext = frameBrowsingContext->GetEmbedderElement();
}
RefPtr<mozilla::LoadInfo> loadInfo = new mozilla::LoadInfo(
RefPtr<mozilla::net::LoadInfo> loadInfo = new mozilla::net::LoadInfo(
loadingPrincipal, triggeringPrincipal, principalToInherit,
sandboxedLoadingPrincipal, topLevelPrincipal,
topLevelStorageAreaPrincipal, resultPrincipalURI, cookieJarSettings,

View File

@ -11,6 +11,7 @@
#include "mozilla/StaticMutex.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/Unused.h"
#include "nsExceptionHandler.h"
namespace mozilla {
namespace ipc {

View File

@ -9,8 +9,10 @@
#include "mozilla/Sprintf.h"
#include "mozilla/SyncRunnable.h"
#include "mozilla/Telemetry.h"
#include "nsServiceManagerUtils.h"
#include "nsICrashService.h"
#include "nsXULAppAPI.h"
#include "nsIFile.h"
// Consistency checking for nsICrashService constants. We depend on the
// equivalence between nsICrashService values and GeckoProcessType values
@ -187,7 +189,7 @@ void CrashReporterHost::NotifyCrashService(GeckoProcessType aProcessType,
break;
}
RefPtr<Promise> promise;
RefPtr<dom::Promise> promise;
crashService->AddCrash(processType, aCrashType, aChildDumpID,
getter_AddRefs(promise));
}

View File

@ -141,8 +141,8 @@ class Endpoint {
#if defined(XP_MACOSX)
void AnnotateCrashReportWithErrno(CrashReporter::Annotation tag, int error);
#else
static inline void AnnotateCrashReportWithErrno(CrashReporter::Annotation tag,
int error) {}
inline void AnnotateCrashReportWithErrno(CrashReporter::Annotation tag,
int error) {}
#endif
// This function is used internally to create a pair of Endpoints. See the

View File

@ -7,6 +7,7 @@
#include "FileDescriptor.h"
#include "mozilla/Assertions.h"
#include "mozilla/ipc/IPDLParamTraits.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "nsDebug.h"

View File

@ -8,6 +8,9 @@
#include "chrome/common/chrome_switches.h"
#include "mozilla/BlockingResourceBase.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPDLParamTraits.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsTraceRefcnt.h"
#include <string.h>

View File

@ -10,6 +10,9 @@
#include "mozilla/ipc/GeckoChildProcessHost.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/StaticPrefs_dom.h"
#include "mozilla/Services.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIObserverService.h"
#include <unistd.h>
#include <fcntl.h>

View File

@ -6,6 +6,7 @@
#ifndef __FORKSERVICE_CHILD_H_
#define __FORKSERVICE_CHILD_H_
#include "base/process_util.h"
#include "nsIObserver.h"
#include "nsString.h"
#include "mozilla/ipc/MiniTransceiver.h"

View File

@ -87,6 +87,7 @@
#include "nsTArray.h"
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
#include "private/pprio.h"
#include "nsIThread.h"
using mozilla::MonitorAutoLock;
using mozilla::Preferences;

View File

@ -10,6 +10,7 @@
#include "mozilla/Unused.h"
#include "mozilla/ipc/PChildToParentStreamChild.h"
#include "mozilla/ipc/PParentToChildStreamChild.h"
#include "mozilla/ipc/InputStreamUtils.h"
namespace mozilla {
namespace ipc {

View File

@ -17,6 +17,7 @@
#include "nsISerialEventTarget.h"
#include "nsStreamUtils.h"
#include "nsThreadUtils.h"
#include "nsIThread.h"
using mozilla::wr::ByteBuffer;

View File

@ -9,6 +9,7 @@
#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/dom/WorkerRef.h"
#include "nsCOMPtr.h"
class nsIAsyncInputStream;

View File

@ -10,6 +10,7 @@
#include "nsSystemInfo.h"
#include "nsThreadUtils.h"
#include "nsITimer.h"
#include "nsIThread.h"
namespace mozilla {
namespace ipc {

View File

@ -40,16 +40,6 @@
using namespace mozilla;
using namespace mozilla::dom;
namespace {
NS_DEFINE_CID(kStringInputStreamCID, NS_STRINGINPUTSTREAM_CID);
NS_DEFINE_CID(kFileInputStreamCID, NS_LOCALFILEINPUTSTREAM_CID);
NS_DEFINE_CID(kBufferedInputStreamCID, NS_BUFFEREDINPUTSTREAM_CID);
NS_DEFINE_CID(kMIMEInputStreamCID, NS_MIMEINPUTSTREAM_CID);
NS_DEFINE_CID(kMultiplexInputStreamCID, NS_MULTIPLEXINPUTSTREAM_CID);
} // namespace
namespace mozilla {
namespace ipc {

View File

@ -8,6 +8,8 @@
#ifndef ipc_glue_LibrarySandboxPreload_h
#define ipc_glue_LibrarySandboxPreload_h
#include "nsString.h"
namespace mozilla {
namespace ipc {
nsAutoCString GetSandboxedGraphitePath();

View File

@ -1779,8 +1779,6 @@ bool MessageChannel::Call(UniquePtr<Message> aMsg, Message* aReply) {
return false;
}
}
return true;
}
bool MessageChannel::WaitForIncomingMessage() {

View File

@ -27,8 +27,6 @@
using base::TimeTicks;
using namespace mozilla::ipc;
NS_DEFINE_NAMED_CID(NS_TIMER_CID);
#ifdef DEBUG
static MessagePump::Delegate* gFirstDelegate;
#endif

View File

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/ipc/MiniTransceiver.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/ipc_message_utils.h"
#include "base/eintr_wrapper.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/DebugOnly.h"
@ -17,6 +18,8 @@
#include <string.h>
#include <errno.h>
namespace mozilla::ipc {
static const size_t kMaxIOVecSize = 64;
static const size_t kMaxDataSize = 8 * 1024;
static const size_t kMaxNumFds = 16;
@ -239,3 +242,5 @@ bool MiniTransceiver::Recv(IPC::Message& aMsg) {
aMsg = std::move(*msg);
return true;
}
} // namespace mozilla::ipc

View File

@ -7,6 +7,8 @@
#ifndef mozilla_ipc_ProcessUtils_h
#define mozilla_ipc_ProcessUtils_h
#include <vector>
#include "FileDescriptor.h"
#include "base/shared_memory.h"
#include "mozilla/Maybe.h"