Bug 1519636 - Reformat recent changes to the Google coding style. r=media-playback-reviewers,alwu

Updated with clang-format version 14.0.5 (taskcluster-cAkeFEZXQmihHYDO8Y4hRw)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D151003
This commit is contained in:
Andi-Bogdan Postelnicu 2022-07-14 08:10:07 +00:00
parent a84d8ed837
commit 72ba7fb691
10 changed files with 606 additions and 579 deletions

View File

@ -51,7 +51,7 @@ HRESULT MFMediaSource::RuntimeClassInitialize(const Maybe<AudioInfo>& aAudio,
MFMediaEngineVideoStream::Create(streamId++, *aVideo, this);
if (!mVideoStream) {
NS_WARNING("Failed to create video stream");
return E_FAIL;
return E_FAIL;
}
mVideoStreamEndedListener = mVideoStream->EndedEvent().Connect(
mTaskQueue, this, &MFMediaSource::HandleStreamEnded);

View File

@ -15,7 +15,7 @@
#include "WebGLTypes.h"
#ifdef MOZ_WAYLAND
#include "mozilla/widget/DMABufSurface.h"
# include "mozilla/widget/DMABufSurface.h"
#endif
namespace mozilla {

View File

@ -19,7 +19,7 @@
#include "mozilla/layers/ImageBridgeParent.h" // for ImageBridgeParent
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc
#include "mozilla/layers/RemoteTextureMap.h"
#include "mozilla/layers/TextureHostOGL.h" // for TextureHostOGL
#include "mozilla/layers/TextureHostOGL.h" // for TextureHostOGL
#include "mozilla/layers/ImageDataSerializer.h"
#include "mozilla/layers/TextureClient.h"
#include "mozilla/layers/GPUVideoTextureHost.h"

View File

@ -916,8 +916,10 @@ struct CrossOriginEmbedderPolicyValidator {
static bool IsLegalValue(const IntegralType e) {
return AreIntegralValuesEqual(e, nsILoadInfo::EMBEDDER_POLICY_NULL) ||
AreIntegralValuesEqual(e, nsILoadInfo::EMBEDDER_POLICY_REQUIRE_CORP) ||
AreIntegralValuesEqual(e, nsILoadInfo::EMBEDDER_POLICY_CREDENTIALLESS);
AreIntegralValuesEqual(e,
nsILoadInfo::EMBEDDER_POLICY_REQUIRE_CORP) ||
AreIntegralValuesEqual(e,
nsILoadInfo::EMBEDDER_POLICY_CREDENTIALLESS);
}
private:

View File

@ -10,7 +10,6 @@
#include "mozilla/dom/AutoEntryScript.h"
using namespace mozilla;
using mozilla::ipc::PTestShellCommandParent;
using mozilla::ipc::TestShellCommandParent;

View File

@ -4,7 +4,6 @@
// Original author: ekr@rtfm.com
#include "logging.h"
#include "nss.h"
#include "ssl.h"

View File

@ -12,7 +12,6 @@
#include "nss.h"
#include "ssl.h"
#include "sdp/RsdparsaSdpParser.h"
#include "sdp/SipccSdpParser.h"
#include "sdp/SdpMediaSection.h"

File diff suppressed because it is too large Load Diff

View File

@ -12,65 +12,65 @@
namespace mozilla {
namespace Module {
/**
* This selector allows components to be marked so that they're only loaded
* into certain kinds of processes. Selectors can be combined.
*/
// Note: This must be kept in sync with the selector matching in
// nsComponentManager.cpp.
enum ProcessSelector {
ANY_PROCESS = 0x0,
MAIN_PROCESS_ONLY = 0x1,
CONTENT_PROCESS_ONLY = 0x2,
/**
* By default, modules are not loaded in the GPU, VR, Socket, RDD, Utility
* and IPDLUnitTest processes, even if ANY_PROCESS is specified. This flag
* enables a module in the relevant process.
*
* NOTE: IPDLUnitTest does not have its own flag, and will only load a
* module if it is enabled in all processes.
*/
ALLOW_IN_GPU_PROCESS = 0x4,
ALLOW_IN_VR_PROCESS = 0x8,
ALLOW_IN_SOCKET_PROCESS = 0x10,
ALLOW_IN_RDD_PROCESS = 0x20,
ALLOW_IN_UTILITY_PROCESS = 0x30,
ALLOW_IN_GPU_AND_MAIN_PROCESS = ALLOW_IN_GPU_PROCESS | MAIN_PROCESS_ONLY,
ALLOW_IN_GPU_AND_VR_PROCESS = ALLOW_IN_GPU_PROCESS | ALLOW_IN_VR_PROCESS,
ALLOW_IN_GPU_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_VR_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_RDD_AND_SOCKET_PROCESS =
ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_RDD_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_RDD_SOCKET_AND_UTILITY_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_RDD_VR_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_VR_PROCESS |
ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_RDD_VR_SOCKET_AND_UTILITY_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_VR_PROCESS |
ALLOW_IN_SOCKET_PROCESS | ALLOW_IN_UTILITY_PROCESS
};
static constexpr size_t kMaxProcessSelector =
size_t(ProcessSelector::ALLOW_IN_GPU_RDD_VR_SOCKET_AND_UTILITY_PROCESS);
/**
* This selector allows components to be marked so that they're only loaded
* into certain kinds of processes. Selectors can be combined.
*/
// Note: This must be kept in sync with the selector matching in
// nsComponentManager.cpp.
enum ProcessSelector {
ANY_PROCESS = 0x0,
MAIN_PROCESS_ONLY = 0x1,
CONTENT_PROCESS_ONLY = 0x2,
/**
* This allows category entries to be marked so that they are or are
* not loaded when in backgroundtask mode.
* By default, modules are not loaded in the GPU, VR, Socket, RDD, Utility
* and IPDLUnitTest processes, even if ANY_PROCESS is specified. This flag
* enables a module in the relevant process.
*
* NOTE: IPDLUnitTest does not have its own flag, and will only load a
* module if it is enabled in all processes.
*/
// Note: This must be kept in sync with the selector matching in
// StaticComponents.cpp.in.
enum BackgroundTasksSelector {
NO_TASKS = 0x0,
ALL_TASKS = 0xFFFF,
};
ALLOW_IN_GPU_PROCESS = 0x4,
ALLOW_IN_VR_PROCESS = 0x8,
ALLOW_IN_SOCKET_PROCESS = 0x10,
ALLOW_IN_RDD_PROCESS = 0x20,
ALLOW_IN_UTILITY_PROCESS = 0x30,
ALLOW_IN_GPU_AND_MAIN_PROCESS = ALLOW_IN_GPU_PROCESS | MAIN_PROCESS_ONLY,
ALLOW_IN_GPU_AND_VR_PROCESS = ALLOW_IN_GPU_PROCESS | ALLOW_IN_VR_PROCESS,
ALLOW_IN_GPU_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_VR_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_RDD_AND_SOCKET_PROCESS =
ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_RDD_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_RDD_SOCKET_AND_UTILITY_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_RDD_VR_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_VR_PROCESS |
ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_RDD_VR_SOCKET_AND_UTILITY_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_RDD_PROCESS | ALLOW_IN_VR_PROCESS |
ALLOW_IN_SOCKET_PROCESS | ALLOW_IN_UTILITY_PROCESS
};
static constexpr size_t kMaxProcessSelector =
size_t(ProcessSelector::ALLOW_IN_GPU_RDD_VR_SOCKET_AND_UTILITY_PROCESS);
/**
* This allows category entries to be marked so that they are or are
* not loaded when in backgroundtask mode.
*/
// Note: This must be kept in sync with the selector matching in
// StaticComponents.cpp.in.
enum BackgroundTasksSelector {
NO_TASKS = 0x0,
ALL_TASKS = 0xFFFF,
};
}; // namespace Module
} // namespace mozilla
#endif // mozilla_Module_h

View File

@ -205,9 +205,7 @@ class MOZ_STACK_CLASS EntryWrapper final {
* Returns the description string for the module this entry belongs to.
* Currently always returns "<unknown module>".
*/
nsCString ModuleDescription() {
return "<unknown module>"_ns;
}
nsCString ModuleDescription() { return "<unknown module>"_ns; }
private:
Variant<nsFactoryEntry*, const StaticModule*> mEntry;
@ -441,7 +439,7 @@ nsresult nsComponentManagerImpl::Init() {
mStatus = NORMAL;
MOZ_ASSERT(!XRE_IsContentProcess() ||
CONTRACTID_HASHTABLE_INITIAL_LENGTH <= 8 ||
CONTRACTID_HASHTABLE_INITIAL_LENGTH <= 8 ||
mFactories.Count() > CONTRACTID_HASHTABLE_INITIAL_LENGTH / 3,
"Initial component hashtable size is too large");
@ -1353,8 +1351,7 @@ size_t nsComponentManagerImpl::SizeOfIncludingThis(
////////////////////////////////////////////////////////////////////////////////
nsFactoryEntry::nsFactoryEntry(const nsCID& aCID, nsIFactory* aFactory)
: mCID(aCID), mFactory(aFactory) {
}
: mCID(aCID), mFactory(aFactory) {}
already_AddRefed<nsIFactory> nsFactoryEntry::GetFactory() {
nsComponentManagerImpl::gComponentManager->mLock.AssertNotCurrentThreadOwns();