зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1748815 - Remove runAfterMenuClosed because it is now unused. r=bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D149913
This commit is contained in:
Родитель
c01d93fd1c
Коммит
742e5abf42
|
@ -39,10 +39,6 @@ class Runnable;
|
|||
// Can only be called on the main thread.
|
||||
- (void)cancelAsynchronousOpening:(NSInteger)aHandle;
|
||||
|
||||
// Run aRunnable once the nested event loop of the currently open menu has been exited.
|
||||
// If no menu is currently open, post the runnable with NS_DispatchToCurrentThread.
|
||||
- (void)runAfterMenuClosed:(RefPtr<mozilla::Runnable>&&)aRunnable;
|
||||
|
||||
// This field is a terrible workaround for a gnarly problem.
|
||||
// It should be set to YES by the caller of -[NSMenu cancelTracking(WithoutAnimation)].
|
||||
// This field gets checked by the native event loop code in nsAppShell.mm to avoid calling
|
||||
|
|
|
@ -15,10 +15,8 @@
|
|||
|
||||
#include "nsCocoaFeatures.h"
|
||||
#include "nsCocoaUtils.h"
|
||||
#include "nsDeque.h"
|
||||
#include "nsMenuX.h"
|
||||
#include "nsObjCExceptions.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "SDKDeclarations.h"
|
||||
|
||||
static BOOL sNeedToUnwindForMenuClosing = NO;
|
||||
|
@ -39,10 +37,6 @@ static BOOL sNeedToUnwindForMenuClosing = NO;
|
|||
// time at at which it is unqueued in _runMenu.
|
||||
MOZMenuOpeningInfo* mPendingOpening; // strong
|
||||
|
||||
// Any runnables we want to run after the current menu event loop has been exited.
|
||||
// Only non-empty if mRunMenuIsOnTheStack is true.
|
||||
nsRefPtrDeque<mozilla::Runnable> mPendingAfterMenuCloseRunnables;
|
||||
|
||||
// An incrementing counter
|
||||
NSInteger mLastHandle;
|
||||
|
||||
|
@ -64,7 +58,6 @@ static BOOL sNeedToUnwindForMenuClosing = NO;
|
|||
|
||||
- (void)dealloc {
|
||||
MOZ_RELEASE_ASSERT(!mPendingOpening, "should be empty at shutdown");
|
||||
MOZ_RELEASE_ASSERT(mPendingAfterMenuCloseRunnables.GetSize() == 0, "should be empty at shutdown");
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -118,11 +111,6 @@ static BOOL sNeedToUnwindForMenuClosing = NO;
|
|||
|
||||
// We have exited _openMenu's nested event loop.
|
||||
MOZMenuOpeningCoordinator.needToUnwindForMenuClosing = NO;
|
||||
|
||||
// Dispatch any pending "after menu close" runnables to the event loop.
|
||||
while (mPendingAfterMenuCloseRunnables.GetSize() != 0) {
|
||||
NS_DispatchToCurrentThread(mPendingAfterMenuCloseRunnables.PopFront());
|
||||
}
|
||||
}
|
||||
|
||||
mRunMenuIsOnTheStack = NO;
|
||||
|
@ -135,16 +123,6 @@ static BOOL sNeedToUnwindForMenuClosing = NO;
|
|||
}
|
||||
}
|
||||
|
||||
- (void)runAfterMenuClosed:(RefPtr<mozilla::Runnable>&&)aRunnable {
|
||||
MOZ_RELEASE_ASSERT(aRunnable);
|
||||
|
||||
if (mRunMenuIsOnTheStack) {
|
||||
mPendingAfterMenuCloseRunnables.Push(aRunnable.forget());
|
||||
} else {
|
||||
NS_DispatchToCurrentThread(aRunnable.forget());
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_openMenu:(NSMenu*)aMenu
|
||||
atScreenPosition:(NSPoint)aPosition
|
||||
forView:(NSView*)aView
|
||||
|
|
Загрузка…
Ссылка в новой задаче