зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1554122 - Mark nsAutoPopupStatePusher as MOZ_RAII; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32453 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
952295a420
Коммит
1b791c15c0
|
@ -83,7 +83,7 @@ class PopupBlocker final {
|
||||||
// library. We give the two object layouts different names so the symbols
|
// library. We give the two object layouts different names so the symbols
|
||||||
// don't conflict, but code should always use the name
|
// don't conflict, but code should always use the name
|
||||||
// |nsAutoPopupStatePusher|.
|
// |nsAutoPopupStatePusher|.
|
||||||
class NS_AUTO_POPUP_STATE_PUSHER {
|
class MOZ_RAII NS_AUTO_POPUP_STATE_PUSHER final {
|
||||||
public:
|
public:
|
||||||
#ifdef MOZILLA_INTERNAL_API
|
#ifdef MOZILLA_INTERNAL_API
|
||||||
explicit NS_AUTO_POPUP_STATE_PUSHER(
|
explicit NS_AUTO_POPUP_STATE_PUSHER(
|
||||||
|
@ -112,11 +112,6 @@ class NS_AUTO_POPUP_STATE_PUSHER {
|
||||||
nsCOMPtr<nsPIDOMWindowOuter> mWindow;
|
nsCOMPtr<nsPIDOMWindowOuter> mWindow;
|
||||||
#endif
|
#endif
|
||||||
mozilla::dom::PopupBlocker::PopupControlState mOldState;
|
mozilla::dom::PopupBlocker::PopupControlState mOldState;
|
||||||
|
|
||||||
private:
|
|
||||||
// Hide so that this class can only be stack-allocated
|
|
||||||
static void* operator new(size_t /*size*/) CPP_THROW_NEW { return nullptr; }
|
|
||||||
static void operator delete(void* /*memory*/) {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define nsAutoPopupStatePusher NS_AUTO_POPUP_STATE_PUSHER
|
#define nsAutoPopupStatePusher NS_AUTO_POPUP_STATE_PUSHER
|
||||||
|
|
Загрузка…
Ссылка в новой задаче