mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm)
This parameter isn't used by any implementation of onDispatchedEvent, and keeping the parameter makes later refactorings in this bug more difficult. MozReview-Commit-ID: 90VY2vYtwCW
This commit is contained in:
parent
89980ca107
commit
c6c1f4bbc9
@ -29271,7 +29271,7 @@ PermissionRequestHelper::ActorDestroy(ActorDestroyReason aWhy)
|
||||
NS_IMPL_ISUPPORTS(DEBUGThreadSlower, nsIThreadObserver)
|
||||
|
||||
NS_IMETHODIMP
|
||||
DEBUGThreadSlower::OnDispatchedEvent(nsIThreadInternal* /* aThread */)
|
||||
DEBUGThreadSlower::OnDispatchedEvent()
|
||||
{
|
||||
MOZ_CRASH("Should never be called!");
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ StorageDBThread::ThreadFunc()
|
||||
NS_IMPL_ISUPPORTS(StorageDBThread::ThreadObserver, nsIThreadObserver)
|
||||
|
||||
NS_IMETHODIMP
|
||||
StorageDBThread::ThreadObserver::OnDispatchedEvent(nsIThreadInternal* aThread)
|
||||
StorageDBThread::ThreadObserver::OnDispatchedEvent()
|
||||
{
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
mHasPendingEvents = true;
|
||||
|
@ -313,7 +313,7 @@ WorkerThread::RecursionDepth(const WorkerThreadFriendKey& /* aKey */) const
|
||||
NS_IMPL_ISUPPORTS(WorkerThread::Observer, nsIThreadObserver)
|
||||
|
||||
NS_IMETHODIMP
|
||||
WorkerThread::Observer::OnDispatchedEvent(nsIThreadInternal* /* aThread */)
|
||||
WorkerThread::Observer::OnDispatchedEvent()
|
||||
{
|
||||
MOZ_CRASH("OnDispatchedEvent() should never be called!");
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ MessagePumpForNonMainUIThreads::DoRunLoop()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MessagePumpForNonMainUIThreads::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
MessagePumpForNonMainUIThreads::OnDispatchedEvent()
|
||||
{
|
||||
// If our thread is sleeping in DoRunLoop's call to WaitForWork() and an
|
||||
// event posts to the nsIThread event queue - break our thread out of
|
||||
|
@ -419,7 +419,7 @@ SheetLoadData::Run()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
SheetLoadData::OnDispatchedEvent(nsIThreadInternal* aThread)
|
||||
SheetLoadData::OnDispatchedEvent()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -790,7 +790,7 @@ nsSocketTransportService::CreateUnixDomainTransport(nsIFile *aPath,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSocketTransportService::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
nsSocketTransportService::OnDispatchedEvent()
|
||||
{
|
||||
#ifndef XP_WIN
|
||||
// On windows poll can hang and this became worse when we introduced the
|
||||
|
@ -595,7 +595,7 @@ bool CacheIOThread::EventsPending(uint32_t aLastLevel)
|
||||
return mLowestLevelWaiting < aLastLevel || mHasXPCOMEvents;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP CacheIOThread::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
NS_IMETHODIMP CacheIOThread::OnDispatchedEvent()
|
||||
{
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
mHasXPCOMEvents = true;
|
||||
|
@ -103,7 +103,7 @@ private:
|
||||
NS_IMPL_ISUPPORTS(ThreadObserver, nsIThreadObserver)
|
||||
|
||||
NS_IMETHODIMP
|
||||
ThreadObserver::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
ThreadObserver::OnDispatchedEvent()
|
||||
{
|
||||
EnqueueTask(NS_NewRunnableFunction("PumpEvents", &PumpEvents), 0);
|
||||
return NS_OK;
|
||||
|
@ -112,7 +112,7 @@ nsBaseAppShell::NativeEventCallback()
|
||||
void
|
||||
nsBaseAppShell::DoProcessMoreGeckoEvents()
|
||||
{
|
||||
OnDispatchedEvent(nullptr);
|
||||
OnDispatchedEvent();
|
||||
}
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ nsBaseAppShell::GetEventloopNestingLevel(uint32_t* aNestingLevelResult)
|
||||
|
||||
// Called from any thread
|
||||
NS_IMETHODIMP
|
||||
nsBaseAppShell::OnDispatchedEvent(nsIThreadInternal *thr)
|
||||
nsBaseAppShell::OnDispatchedEvent()
|
||||
{
|
||||
if (mBlockNativeEvent)
|
||||
return NS_OK;
|
||||
@ -241,7 +241,7 @@ nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal *thr, bool mayWait)
|
||||
// really must start processing native events here again.
|
||||
mBlockNativeEvent = false;
|
||||
if (NS_HasPendingEvents(thr))
|
||||
OnDispatchedEvent(thr); // in case we blocked it earlier
|
||||
OnDispatchedEvent(); // in case we blocked it earlier
|
||||
}
|
||||
|
||||
PRIntervalTime start = PR_IntervalNow();
|
||||
|
@ -315,7 +315,7 @@ nsAppShell::DoProcessMoreGeckoEvents()
|
||||
// if we need it, which insures NS_ProcessPendingEvents gets called and all
|
||||
// gecko events get processed.
|
||||
if (mEventloopNestingLevel < 2) {
|
||||
OnDispatchedEvent(nullptr);
|
||||
OnDispatchedEvent();
|
||||
mNativeCallbackPending = false;
|
||||
} else {
|
||||
mNativeCallbackPending = true;
|
||||
|
@ -560,7 +560,7 @@ LazyIdleThread::GetName(nsACString& aName)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LazyIdleThread::OnDispatchedEvent(nsIThreadInternal* /*aThread */)
|
||||
LazyIdleThread::OnDispatchedEvent()
|
||||
{
|
||||
MOZ_ASSERT(mOwningEventTarget->IsOnCurrentThread());
|
||||
return NS_OK;
|
||||
|
@ -71,7 +71,7 @@ interface nsIThreadInternal : nsIThread
|
||||
*
|
||||
* var NativeQueue;
|
||||
* Observer = {
|
||||
* onDispatchedEvent(thread) {
|
||||
* onDispatchedEvent() {
|
||||
* NativeQueue.signal();
|
||||
* }
|
||||
* onProcessNextEvent(thread, mayWait) {
|
||||
@ -99,11 +99,8 @@ interface nsIThreadObserver : nsISupports
|
||||
/**
|
||||
* This method is called after an event has been dispatched to the thread.
|
||||
* This method may be called from any thread.
|
||||
*
|
||||
* @param thread
|
||||
* The thread where the event is being dispatched.
|
||||
*/
|
||||
void onDispatchedEvent(in nsIThreadInternal thread);
|
||||
void onDispatchedEvent();
|
||||
|
||||
/**
|
||||
* This method is called when nsIThread::ProcessNextEvent is called. It does
|
||||
|
@ -751,7 +751,7 @@ nsThread::PutEvent(already_AddRefed<nsIRunnable> aEvent, nsNestedEventTarget* aT
|
||||
}
|
||||
|
||||
if (obs) {
|
||||
obs->OnDispatchedEvent(this);
|
||||
obs->OnDispatchedEvent();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user