Bug 1634253 - P1. Fix constness. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D73819
This commit is contained in:
Jean-Yves Avenard 2020-05-07 05:02:21 +00:00
Родитель 21678aeb07
Коммит 151a0ccd4e
4 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -322,7 +322,8 @@ uint32_t WorkerThread::RecursionDepth(
return mNestedEventLoopDepth;
}
PerformanceCounter* WorkerThread::GetPerformanceCounter(nsIRunnable* aEvent) {
PerformanceCounter* WorkerThread::GetPerformanceCounter(
nsIRunnable* aEvent) const {
if (mWorkerPrivate) {
return mWorkerPrivate->GetPerformanceCounter();
}

Просмотреть файл

@ -75,7 +75,7 @@ class WorkerThread final : public nsThread {
uint32_t RecursionDepth(const WorkerThreadFriendKey& aKey) const;
PerformanceCounter* GetPerformanceCounter(nsIRunnable* aEvent) override;
PerformanceCounter* GetPerformanceCounter(nsIRunnable* aEvent) const override;
NS_INLINE_DECL_REFCOUNTING_INHERITED(WorkerThread, nsThread)

Просмотреть файл

@ -1005,7 +1005,7 @@ static bool GetLabeledRunnableName(nsIRunnable* aEvent, nsACString& aName,
#endif
mozilla::PerformanceCounter* nsThread::GetPerformanceCounter(
nsIRunnable* aEvent) {
nsIRunnable* aEvent) const {
RefPtr<SchedulerGroup::Runnable> docRunnable = do_QueryObject(aEvent);
if (docRunnable) {
mozilla::dom::DocGroup* docGroup = docRunnable->DocGroup();
@ -1352,7 +1352,7 @@ void nsThread::SetScriptObserver(
mScriptObserver = aScriptObserver;
}
void nsThread::DoMainThreadSpecificProcessing(bool aReallyWait) {
void nsThread::DoMainThreadSpecificProcessing(bool aReallyWait) const {
MOZ_ASSERT(mIsMainThread);
ipc::CancelCPOWs();

Просмотреть файл

@ -124,7 +124,7 @@ class PerformanceCounterState {
bool mCurrentRunnableIsIdleRunnable = false;
// Whether we're attached to the mainthread nsThread.
bool mIsMainThread;
const bool mIsMainThread;
// The timestamp from which time to be accounted for should be measured. This
// can be the start of a runnable running or the end of a nested runnable
@ -179,7 +179,7 @@ class nsThread : public nsIThreadInternal,
public:
// The PRThread corresponding to this thread.
PRThread* GetPRThread() { return mThread; }
PRThread* GetPRThread() const { return mThread; }
const void* StackBase() const { return mStackBase; }
size_t StackSize() const { return mStackSize; }
@ -225,10 +225,10 @@ class nsThread : public nsIThreadInternal,
mozilla::SynchronizedEventQueue* EventQueue() { return mEvents.get(); }
bool ShuttingDown() { return mShutdownContext != nullptr; }
bool ShuttingDown() const { return mShutdownContext != nullptr; }
virtual mozilla::PerformanceCounter* GetPerformanceCounter(
nsIRunnable* aEvent);
nsIRunnable* aEvent) const;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
@ -258,7 +258,7 @@ class nsThread : public nsIThreadInternal,
nsLocalExecutionRecord EnterLocalExecution();
private:
void DoMainThreadSpecificProcessing(bool aReallyWait);
void DoMainThreadSpecificProcessing(bool aReallyWait) const;
protected:
friend class nsThreadShutdownEvent;
@ -328,7 +328,7 @@ class nsThread : public nsIThreadInternal,
int8_t mPriority;
bool mIsMainThread;
const bool mIsMainThread;
mozilla::Atomic<bool, mozilla::Relaxed>* mIsAPoolThreadFree;
// Set to true if this thread creates a JSRuntime.