зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1634281
- Use nsTHashMap for nsBaseHashtable/nsDataHashtable uses with nsCOMPtr data type. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105964
This commit is contained in:
Родитель
bc9766c354
Коммит
ca86d54b8c
|
@ -70,8 +70,8 @@ class TemporaryAccessGrantObserver final : public nsIObserver {
|
|||
~TemporaryAccessGrantObserver() = default;
|
||||
|
||||
private:
|
||||
typedef nsDataHashtable<TemporaryAccessGrantCacheKey, nsCOMPtr<nsITimer>>
|
||||
ObserversTable;
|
||||
using ObserversTable =
|
||||
nsTHashMap<TemporaryAccessGrantCacheKey, nsCOMPtr<nsITimer>>;
|
||||
static UniquePtr<ObserversTable> sObservers;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
RefPtr<PermissionManager> mPM;
|
||||
|
|
|
@ -122,7 +122,7 @@ int32_t nsIWidget::sPointerIdCounter = 0;
|
|||
// Some statics from nsIWidget.h
|
||||
/*static*/
|
||||
uint64_t AutoObserverNotifier::sObserverId = 0;
|
||||
/*static*/ nsDataHashtable<nsUint64HashKey, nsCOMPtr<nsIObserver>>
|
||||
/*static*/ nsTHashMap<uint64_t, nsCOMPtr<nsIObserver>>
|
||||
AutoObserverNotifier::sSavedObservers;
|
||||
|
||||
// The maximum amount of time to let the EnableDragDrop runnable wait in the
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "mozilla/widget/IMEData.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsColor.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsID.h"
|
||||
#include "nsIObserver.h"
|
||||
|
@ -38,6 +37,7 @@
|
|||
#include "nsSize.h"
|
||||
#include "nsStringFwd.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsTHashMap.h"
|
||||
#include "nsWidgetInitData.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
|
@ -351,8 +351,7 @@ struct AutoObserverNotifier {
|
|||
|
||||
private:
|
||||
static uint64_t sObserverId;
|
||||
static nsDataHashtable<nsUint64HashKey, nsCOMPtr<nsIObserver>>
|
||||
sSavedObservers;
|
||||
static nsTHashMap<uint64_t, nsCOMPtr<nsIObserver>> sSavedObservers;
|
||||
};
|
||||
|
||||
} // namespace widget
|
||||
|
|
Загрузка…
Ссылка в новой задаче