Skip to content

Commit 5e72855

Browse files
committed
Bug 1523969 part 12 - Move method definition inline comments to new line in 'ipc/'. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21112 --HG-- extra : rebase_source : f7e1461efb6f9e190dd4d9b161e2fb898aeb203a
1 parent 62b9ce5 commit 5e72855

24 files changed

+112
-71
lines changed

ipc/glue/BrowserProcessSubThread.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ static const char* kBrowserThreadNames[BrowserProcessSubThread::ID_COUNT] = {
2828
#endif
2929
};
3030

31-
/* static */ StaticMutex BrowserProcessSubThread::sLock;
31+
/* static */
32+
StaticMutex BrowserProcessSubThread::sLock;
3233
BrowserProcessSubThread* BrowserProcessSubThread::sBrowserThreads[ID_COUNT] = {
3334
nullptr, // IO
3435
// nullptr, // FILE

ipc/glue/CrashReporterClient.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ void CrashReporterClient::AppendAppNotes(const nsCString& aData) {
3434
mMetadata->AppendAppNotes(aData);
3535
}
3636

37-
/* static */ void CrashReporterClient::InitSingletonWithShmem(
38-
const Shmem& aShmem) {
37+
/* static */
38+
void CrashReporterClient::InitSingletonWithShmem(const Shmem& aShmem) {
3939
{
4040
StaticMutexAutoLock lock(sLock);
4141

@@ -46,12 +46,14 @@ void CrashReporterClient::AppendAppNotes(const nsCString& aData) {
4646
CrashReporter::NotifyCrashReporterClientCreated();
4747
}
4848

49-
/* static */ void CrashReporterClient::DestroySingleton() {
49+
/* static */
50+
void CrashReporterClient::DestroySingleton() {
5051
StaticMutexAutoLock lock(sLock);
5152
sClientSingleton = nullptr;
5253
}
5354

54-
/* static */ RefPtr<CrashReporterClient> CrashReporterClient::GetSingleton() {
55+
/* static */
56+
RefPtr<CrashReporterClient> CrashReporterClient::GetSingleton() {
5557
StaticMutexAutoLock lock(sLock);
5658
return sClientSingleton;
5759
}

ipc/glue/CrashReporterHost.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ bool CrashReporterHost::FinalizeCrashReport() {
155155
return true;
156156
}
157157

158-
/* static */ void CrashReporterHost::NotifyCrashService(
159-
GeckoProcessType aProcessType, int32_t aCrashType,
160-
const nsString& aChildDumpID) {
158+
/* static */
159+
void CrashReporterHost::NotifyCrashService(GeckoProcessType aProcessType,
160+
int32_t aCrashType,
161+
const nsString& aChildDumpID) {
161162
if (!NS_IsMainThread()) {
162163
RefPtr<Runnable> runnable = NS_NewRunnableFunction(
163164
"ipc::CrashReporterHost::NotifyCrashService", [&]() -> void {

ipc/glue/CrossProcessSemaphore_posix.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ struct SemaphoreData {
2525

2626
namespace mozilla {
2727

28-
/* static */ CrossProcessSemaphore* CrossProcessSemaphore::Create(
29-
const char*, uint32_t aInitialValue) {
28+
/* static */
29+
CrossProcessSemaphore* CrossProcessSemaphore::Create(const char*,
30+
uint32_t aInitialValue) {
3031
RefPtr<ipc::SharedMemoryBasic> sharedBuffer = new ipc::SharedMemoryBasic;
3132
if (!sharedBuffer->Create(sizeof(SemaphoreData))) {
3233
return nullptr;
@@ -57,7 +58,8 @@ namespace mozilla {
5758
return sem;
5859
}
5960

60-
/* static */ CrossProcessSemaphore* CrossProcessSemaphore::Create(
61+
/* static */
62+
CrossProcessSemaphore* CrossProcessSemaphore::Create(
6163
CrossProcessSemaphoreHandle aHandle) {
6264
RefPtr<ipc::SharedMemoryBasic> sharedBuffer = new ipc::SharedMemoryBasic;
6365

ipc/glue/CrossProcessSemaphore_unimplemented.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010

1111
namespace mozilla {
1212

13-
/* static */ CrossProcessSemaphore* CrossProcessSemaphore::Create(const char*,
14-
uint32_t) {
13+
/* static */
14+
CrossProcessSemaphore* CrossProcessSemaphore::Create(const char*, uint32_t) {
1515
MOZ_CRASH("Cross-process semaphores not allowed on this platform.");
1616
return nullptr;
1717
}
1818

19-
/* static */ CrossProcessSemaphore* CrossProcessSemaphore::Create(
19+
/* static */
20+
CrossProcessSemaphore* CrossProcessSemaphore::Create(
2021
CrossProcessSemaphoreHandle) {
2122
MOZ_CRASH("Cross-process semaphores not allowed on this platform.");
2223
return nullptr;

ipc/glue/CrossProcessSemaphore_windows.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ using base::ProcessHandle;
1717

1818
namespace mozilla {
1919

20-
/* static */ CrossProcessSemaphore* CrossProcessSemaphore::Create(
21-
const char*, uint32_t aInitialValue) {
20+
/* static */
21+
CrossProcessSemaphore* CrossProcessSemaphore::Create(const char*,
22+
uint32_t aInitialValue) {
2223
// We explicitly share this using DuplicateHandle, we do -not- want this to
2324
// be inherited by child processes by default! So no security attributes are
2425
// given.
@@ -30,7 +31,8 @@ namespace mozilla {
3031
return new CrossProcessSemaphore(semaphore);
3132
}
3233

33-
/* static */ CrossProcessSemaphore* CrossProcessSemaphore::Create(
34+
/* static */
35+
CrossProcessSemaphore* CrossProcessSemaphore::Create(
3436
CrossProcessSemaphoreHandle aHandle) {
3537
DWORD flags;
3638
if (!::GetHandleInformation(aHandle, &flags)) {

ipc/glue/IPCStreamChild.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class IPCStreamSourceChild final : public PChildToParentStreamChild,
6666

6767
} // anonymous namespace
6868

69-
/* static */ PChildToParentStreamChild* IPCStreamSource::Create(
69+
/* static */
70+
PChildToParentStreamChild* IPCStreamSource::Create(
7071
nsIAsyncInputStream* aInputStream, dom::ContentChild* aManager) {
7172
MOZ_ASSERT(aInputStream);
7273
MOZ_ASSERT(aManager);
@@ -87,7 +88,8 @@ class IPCStreamSourceChild final : public PChildToParentStreamChild,
8788
return source;
8889
}
8990

90-
/* static */ PChildToParentStreamChild* IPCStreamSource::Create(
91+
/* static */
92+
PChildToParentStreamChild* IPCStreamSource::Create(
9193
nsIAsyncInputStream* aInputStream, PBackgroundChild* aManager) {
9294
MOZ_ASSERT(aInputStream);
9395
MOZ_ASSERT(aManager);
@@ -105,8 +107,8 @@ class IPCStreamSourceChild final : public PChildToParentStreamChild,
105107
return source;
106108
}
107109

108-
/* static */ IPCStreamSource* IPCStreamSource::Cast(
109-
PChildToParentStreamChild* aActor) {
110+
/* static */
111+
IPCStreamSource* IPCStreamSource::Cast(PChildToParentStreamChild* aActor) {
110112
MOZ_ASSERT(aActor);
111113
return static_cast<IPCStreamSourceChild*>(aActor);
112114
}
@@ -167,7 +169,8 @@ void DeallocPParentToChildStreamChild(PParentToChildStreamChild* aActor) {
167169
delete aActor;
168170
}
169171

170-
/* static */ IPCStreamDestination* IPCStreamDestination::Cast(
172+
/* static */
173+
IPCStreamDestination* IPCStreamDestination::Cast(
171174
PParentToChildStreamChild* aActor) {
172175
MOZ_ASSERT(aActor);
173176
return static_cast<IPCStreamDestinationChild*>(aActor);

ipc/glue/IPCStreamParent.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ class IPCStreamSourceParent final : public PParentToChildStreamParent,
6464

6565
} // anonymous namespace
6666

67-
/* static */ PParentToChildStreamParent* IPCStreamSource::Create(
67+
/* static */
68+
PParentToChildStreamParent* IPCStreamSource::Create(
6869
nsIAsyncInputStream* aInputStream, dom::ContentParent* aManager) {
6970
MOZ_ASSERT(aInputStream);
7071
MOZ_ASSERT(aManager);
@@ -86,7 +87,8 @@ class IPCStreamSourceParent final : public PParentToChildStreamParent,
8687
return source;
8788
}
8889

89-
/* static */ PParentToChildStreamParent* IPCStreamSource::Create(
90+
/* static */
91+
PParentToChildStreamParent* IPCStreamSource::Create(
9092
nsIAsyncInputStream* aInputStream, PBackgroundParent* aManager) {
9193
MOZ_ASSERT(aInputStream);
9294
MOZ_ASSERT(aManager);
@@ -105,8 +107,8 @@ class IPCStreamSourceParent final : public PParentToChildStreamParent,
105107
return source;
106108
}
107109

108-
/* static */ IPCStreamSource* IPCStreamSource::Cast(
109-
PParentToChildStreamParent* aActor) {
110+
/* static */
111+
IPCStreamSource* IPCStreamSource::Cast(PParentToChildStreamParent* aActor) {
110112
MOZ_ASSERT(aActor);
111113
return static_cast<IPCStreamSourceParent*>(aActor);
112114
}
@@ -167,7 +169,8 @@ void DeallocPChildToParentStreamParent(PChildToParentStreamParent* aActor) {
167169
delete aActor;
168170
}
169171

170-
/* static */ IPCStreamDestination* IPCStreamDestination::Cast(
172+
/* static */
173+
IPCStreamDestination* IPCStreamDestination::Cast(
171174
PChildToParentStreamParent* aActor) {
172175
MOZ_ASSERT(aActor);
173176
return static_cast<IPCStreamDestinationParent*>(aActor);

ipc/glue/InProcessImpl.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ bool InProcessParent::sShutdown = false;
2323
// InProcess actor lifecycle management //
2424
//////////////////////////////////////////
2525

26-
/* static */ InProcessChild* InProcessChild::Singleton() {
26+
/* static */
27+
InProcessChild* InProcessChild::Singleton() {
2728
MOZ_ASSERT(NS_IsMainThread());
2829

2930
if (!sSingleton) {
@@ -32,7 +33,8 @@ bool InProcessParent::sShutdown = false;
3233
return sSingleton;
3334
}
3435

35-
/* static */ InProcessParent* InProcessParent::Singleton() {
36+
/* static */
37+
InProcessParent* InProcessParent::Singleton() {
3638
MOZ_ASSERT(NS_IsMainThread());
3739

3840
if (!sSingleton) {
@@ -41,7 +43,8 @@ bool InProcessParent::sShutdown = false;
4143
return sSingleton;
4244
}
4345

44-
/* static */ void InProcessParent::Startup() {
46+
/* static */
47+
void InProcessParent::Startup() {
4548
MOZ_ASSERT(NS_IsMainThread());
4649

4750
if (sShutdown) {
@@ -82,7 +85,8 @@ bool InProcessParent::sShutdown = false;
8285
InProcessChild::sSingleton = child.forget();
8386
}
8487

85-
/* static */ void InProcessParent::Shutdown() {
88+
/* static */
89+
void InProcessParent::Shutdown() {
8690
MOZ_ASSERT(NS_IsMainThread());
8791

8892
if (!sSingleton || sShutdown) {
@@ -176,12 +180,14 @@ static IProtocol* GetOtherInProcessActor(IProtocol* aActor) {
176180
return otherActor;
177181
}
178182

179-
/* static */ IProtocol* InProcessParent::ChildActorFor(IProtocol* aActor) {
183+
/* static */
184+
IProtocol* InProcessParent::ChildActorFor(IProtocol* aActor) {
180185
MOZ_ASSERT(aActor && aActor->GetSide() == ParentSide);
181186
return GetOtherInProcessActor(aActor);
182187
}
183188

184-
/* static */ IProtocol* InProcessChild::ParentActorFor(IProtocol* aActor) {
189+
/* static */
190+
IProtocol* InProcessChild::ParentActorFor(IProtocol* aActor) {
185191
MOZ_ASSERT(aActor && aActor->GetSide() == ChildSide);
186192
return GetOtherInProcessActor(aActor);
187193
}

ipc/glue/MessageChannel.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,8 @@ bool MessageChannel::MaybeInterceptSpecialIOMessage(const Message& aMsg) {
11431143
return false;
11441144
}
11451145

1146-
/* static */ bool MessageChannel::IsAlwaysDeferred(const Message& aMsg) {
1146+
/* static */
1147+
bool MessageChannel::IsAlwaysDeferred(const Message& aMsg) {
11471148
// If a message is not NESTED_INSIDE_CPOW and not sync, then we always defer
11481149
// it.
11491150
return aMsg.nested_level() != IPC::Message::NESTED_INSIDE_CPOW &&

ipc/glue/ProcessChild.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ ProcessChild::ProcessChild(ProcessId aParentPid)
3131

3232
ProcessChild::~ProcessChild() { gProcessChild = nullptr; }
3333

34-
/* static */ void ProcessChild::QuickExit() {
34+
/* static */
35+
void ProcessChild::QuickExit() {
3536
#ifdef XP_WIN
3637
// In bug 1254829, the destructor got called when dll got detached on windows,
3738
// switch to TerminateProcess to bypass dll detach handler during the process

ipc/glue/SharedMemory.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ SharedMemory::SharedMemory() : mAllocSize(0), mMappedSize(0) {
4949
}
5050
}
5151

52-
/*static*/ size_t SharedMemory::PageAlignedSize(size_t aSize) {
52+
/*static*/
53+
size_t SharedMemory::PageAlignedSize(size_t aSize) {
5354
size_t pageSize = SystemPageSize();
5455
size_t nPagesNeeded = size_t(ceil(double(aSize) / double(pageSize)));
5556
return pageSize * nPagesNeeded;
@@ -71,7 +72,8 @@ void SharedMemory::Unmapped() {
7172
mMappedSize = 0;
7273
}
7374

74-
/*static*/ void SharedMemory::Destroyed() {
75+
/*static*/
76+
void SharedMemory::Destroyed() {
7577
MOZ_ASSERT(gShmemAllocated >= mAllocSize,
7678
"Can't destroy more than allocated");
7779
gShmemAllocated -= mAllocSize;

ipc/mscom/ActivationContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ ActivationContext::~ActivationContext() { Release(); }
8787
return reinterpret_cast<uintptr_t>(actCtx);
8888
}
8989

90-
/* static */ HRESULT ActivationContext::GetCurrentManifestPath(
91-
nsAString& aOutManifestPath) {
90+
/* static */
91+
HRESULT ActivationContext::GetCurrentManifestPath(nsAString& aOutManifestPath) {
9292
aOutManifestPath.Truncate();
9393

9494
SIZE_T bytesNeeded;

ipc/mscom/AgileReference.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ AgileReference::Resolve(REFIID aIid, void** aOutInterface) const {
158158
return originalInterface->QueryInterface(aIid, aOutInterface);
159159
}
160160

161-
/* static */ IGlobalInterfaceTable* AgileReference::ObtainGit() {
161+
/* static */
162+
IGlobalInterfaceTable* AgileReference::ObtainGit() {
162163
// Internally to COM, the Global Interface Table is a singleton, therefore we
163164
// don't worry about holding onto this reference indefinitely.
164165
static IGlobalInterfaceTable* sGit = []() -> IGlobalInterfaceTable* {

ipc/mscom/DispatchForwarder.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
namespace mozilla {
1414
namespace mscom {
1515

16-
/* static */ HRESULT DispatchForwarder::Create(IInterceptor* aInterceptor,
17-
STAUniquePtr<IDispatch>& aTarget,
18-
IUnknown** aOutput) {
16+
/* static */
17+
HRESULT DispatchForwarder::Create(IInterceptor* aInterceptor,
18+
STAUniquePtr<IDispatch>& aTarget,
19+
IUnknown** aOutput) {
1920
MOZ_ASSERT(aInterceptor && aOutput);
2021
if (!aOutput) {
2122
return E_INVALIDARG;

ipc/mscom/EnsureMTA.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ static mozilla::StaticAutoPtr<BackgroundMTAData> sMTAData;
5858
namespace mozilla {
5959
namespace mscom {
6060

61-
/* static */ nsCOMPtr<nsIThread> EnsureMTA::GetMTAThread() {
61+
/* static */
62+
nsCOMPtr<nsIThread> EnsureMTA::GetMTAThread() {
6263
if (!sMTAData) {
6364
sMTAData = new BackgroundMTAData();
6465
ClearOnShutdown(&sMTAData, ShutdownPhase::ShutdownThreads);

ipc/mscom/Interceptor.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ static detail::LiveSet& GetLiveSet() {
192192

193193
MOZ_THREAD_LOCAL(bool) Interceptor::tlsCreatingStdMarshal;
194194

195-
/* static */ HRESULT Interceptor::Create(STAUniquePtr<IUnknown> aTarget,
196-
IInterceptorSink* aSink,
197-
REFIID aInitialIid,
198-
void** aOutInterface) {
195+
/* static */
196+
HRESULT Interceptor::Create(STAUniquePtr<IUnknown> aTarget,
197+
IInterceptorSink* aSink, REFIID aInitialIid,
198+
void** aOutInterface) {
199199
MOZ_ASSERT(aOutInterface && aTarget && aSink);
200200
if (!aOutInterface) {
201201
return E_INVALIDARG;
@@ -812,8 +812,8 @@ Interceptor::AddRef() { return WeakReferenceSupport::AddRef(); }
812812
ULONG
813813
Interceptor::Release() { return WeakReferenceSupport::Release(); }
814814

815-
/* static */ HRESULT Interceptor::DisconnectRemotesForTarget(
816-
IUnknown* aTarget) {
815+
/* static */
816+
HRESULT Interceptor::DisconnectRemotesForTarget(IUnknown* aTarget) {
817817
MOZ_ASSERT(aTarget);
818818

819819
detail::LiveSetAutoLock lock(GetLiveSet());

0 commit comments

Comments
 (0)