зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1523969 part 24 - Move method definition inline comments to new line in 'tools/'. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D21125 --HG-- extra : rebase_source : 06b6b612faecb0beff2c359f8893e40638c4a029 extra : histedit_source : 69bbbe1c1cd598cc52103143baf6bbe4ff4b2d5b
This commit is contained in:
Родитель
6d8bc2e134
Коммит
a5e1b94718
|
@ -69,7 +69,8 @@
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
/* static */ int Thread::GetCurrentId() { return gettid(); }
|
/* static */
|
||||||
|
int Thread::GetCurrentId() { return gettid(); }
|
||||||
|
|
||||||
void* GetStackTop(void* aGuess) { return aGuess; }
|
void* GetStackTop(void* aGuess) { return aGuess; }
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
|
|
||||||
// this port is based off of v8 svn revision 9837
|
// this port is based off of v8 svn revision 9837
|
||||||
|
|
||||||
/* static */ int Thread::GetCurrentId() { return gettid(); }
|
/* static */
|
||||||
|
int Thread::GetCurrentId() { return gettid(); }
|
||||||
|
|
||||||
void* GetStackTop(void* aGuess) {
|
void* GetStackTop(void* aGuess) {
|
||||||
pthread_t thread = pthread_self();
|
pthread_t thread = pthread_self();
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
#include "mozilla/StackWalk_windows.h"
|
#include "mozilla/StackWalk_windows.h"
|
||||||
#include "mozilla/WindowsVersion.h"
|
#include "mozilla/WindowsVersion.h"
|
||||||
|
|
||||||
/* static */ int Thread::GetCurrentId() {
|
/* static */
|
||||||
|
int Thread::GetCurrentId() {
|
||||||
DWORD threadId = GetCurrentThreadId();
|
DWORD threadId = GetCurrentThreadId();
|
||||||
MOZ_ASSERT(threadId <= INT32_MAX, "native thread ID is > INT32_MAX");
|
MOZ_ASSERT(threadId <= INT32_MAX, "native thread ID is > INT32_MAX");
|
||||||
return int(threadId);
|
return int(threadId);
|
||||||
|
|
|
@ -14,8 +14,8 @@ using namespace mozilla::ipc;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
/* static */ already_AddRefed<ChildProfilerController>
|
/* static */
|
||||||
ChildProfilerController::Create(
|
already_AddRefed<ChildProfilerController> ChildProfilerController::Create(
|
||||||
mozilla::ipc::Endpoint<PProfilerChild>&& aEndpoint) {
|
mozilla::ipc::Endpoint<PProfilerChild>&& aEndpoint) {
|
||||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||||
RefPtr<ChildProfilerController> cpc = new ChildProfilerController();
|
RefPtr<ChildProfilerController> cpc = new ChildProfilerController();
|
||||||
|
|
|
@ -36,8 +36,8 @@ class ProfilerParentTracker final {
|
||||||
|
|
||||||
UniquePtr<ProfilerParentTracker> ProfilerParentTracker::sInstance;
|
UniquePtr<ProfilerParentTracker> ProfilerParentTracker::sInstance;
|
||||||
|
|
||||||
/* static */ void ProfilerParentTracker::StartTracking(
|
/* static */
|
||||||
ProfilerParent* aProfilerParent) {
|
void ProfilerParentTracker::StartTracking(ProfilerParent* aProfilerParent) {
|
||||||
if (!sInstance) {
|
if (!sInstance) {
|
||||||
sInstance = MakeUnique<ProfilerParentTracker>();
|
sInstance = MakeUnique<ProfilerParentTracker>();
|
||||||
ClearOnShutdown(&sInstance);
|
ClearOnShutdown(&sInstance);
|
||||||
|
@ -45,14 +45,16 @@ UniquePtr<ProfilerParentTracker> ProfilerParentTracker::sInstance;
|
||||||
sInstance->mProfilerParents.AppendElement(aProfilerParent);
|
sInstance->mProfilerParents.AppendElement(aProfilerParent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void ProfilerParentTracker::StopTracking(ProfilerParent* aParent) {
|
/* static */
|
||||||
|
void ProfilerParentTracker::StopTracking(ProfilerParent* aParent) {
|
||||||
if (sInstance) {
|
if (sInstance) {
|
||||||
sInstance->mProfilerParents.RemoveElement(aParent);
|
sInstance->mProfilerParents.RemoveElement(aParent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FuncType>
|
template <typename FuncType>
|
||||||
/* static */ void ProfilerParentTracker::Enumerate(FuncType aIterFunc) {
|
/* static */
|
||||||
|
void ProfilerParentTracker::Enumerate(FuncType aIterFunc) {
|
||||||
if (sInstance) {
|
if (sInstance) {
|
||||||
for (ProfilerParent* profilerParent : sInstance->mProfilerParents) {
|
for (ProfilerParent* profilerParent : sInstance->mProfilerParents) {
|
||||||
if (!profilerParent->mDestroyed) {
|
if (!profilerParent->mDestroyed) {
|
||||||
|
@ -82,7 +84,8 @@ ProfilerParentTracker::~ProfilerParentTracker() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ Endpoint<PProfilerChild> ProfilerParent::CreateForProcess(
|
/* static */
|
||||||
|
Endpoint<PProfilerChild> ProfilerParent::CreateForProcess(
|
||||||
base::ProcessId aOtherPid) {
|
base::ProcessId aOtherPid) {
|
||||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||||
Endpoint<PProfilerParent> parent;
|
Endpoint<PProfilerParent> parent;
|
||||||
|
@ -173,8 +176,8 @@ ProfilerParent::GatherProfiles() {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void ProfilerParent::ProfilerStarted(
|
/* static */
|
||||||
nsIProfilerStartParams* aParams) {
|
void ProfilerParent::ProfilerStarted(nsIProfilerStartParams* aParams) {
|
||||||
if (!NS_IsMainThread()) {
|
if (!NS_IsMainThread()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +201,8 @@ ProfilerParent::GatherProfiles() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void ProfilerParent::ProfilerStopped() {
|
/* static */
|
||||||
|
void ProfilerParent::ProfilerStopped() {
|
||||||
if (!NS_IsMainThread()) {
|
if (!NS_IsMainThread()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -208,7 +212,8 @@ ProfilerParent::GatherProfiles() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void ProfilerParent::ProfilerPaused() {
|
/* static */
|
||||||
|
void ProfilerParent::ProfilerPaused() {
|
||||||
if (!NS_IsMainThread()) {
|
if (!NS_IsMainThread()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -218,7 +223,8 @@ ProfilerParent::GatherProfiles() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void ProfilerParent::ProfilerResumed() {
|
/* static */
|
||||||
|
void ProfilerParent::ProfilerResumed() {
|
||||||
if (!NS_IsMainThread()) {
|
if (!NS_IsMainThread()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче