зеркало из https://github.com/mozilla/gecko-dev.git
relanding switch to nsAutoTObserverArray per bug 407442.
This commit is contained in:
Родитель
5fefbd0626
Коммит
8e8fcb0405
|
@ -1157,7 +1157,7 @@ nsEventListenerManager::HandleEvent(nsPresContext* aPresContext,
|
|||
|
||||
found:
|
||||
|
||||
nsTObserverArray<nsListenerStruct*>::EndLimitedIterator iter(mListeners);
|
||||
nsAutoTObserverArray<nsListenerStruct*, 2>::EndLimitedIterator iter(mListeners);
|
||||
nsAutoPopupStatePusher popupStatePusher(nsDOMEvent::GetEventPopupControlState(aEvent));
|
||||
PRBool hasListener = PR_FALSE;
|
||||
while (iter.HasMore()) {
|
||||
|
|
|
@ -188,17 +188,17 @@ protected:
|
|||
nsresult GetDOM2EventGroup(nsIDOMEventGroup** aGroup);
|
||||
PRBool ListenerCanHandle(nsListenerStruct* aLs, nsEvent* aEvent);
|
||||
|
||||
nsTObserverArray<nsListenerStruct*> mListeners;
|
||||
nsISupports* mTarget; //WEAK
|
||||
PRUint32 mMayHaveMutationListeners : 1;
|
||||
nsAutoTObserverArray<nsListenerStruct*, 2> mListeners;
|
||||
nsISupports* mTarget; //WEAK
|
||||
PRUint32 mMayHaveMutationListeners : 1;
|
||||
// These two member variables are used to cache the information
|
||||
// about the last event which was handled but for which event listener manager
|
||||
// didn't have event listeners.
|
||||
PRUint32 mNoListenerForEvent : 31;
|
||||
nsCOMPtr<nsIAtom> mNoListenerForEventAtom;
|
||||
PRUint32 mNoListenerForEvent : 31;
|
||||
nsCOMPtr<nsIAtom> mNoListenerForEventAtom;
|
||||
|
||||
static PRUint32 mInstanceCount;
|
||||
static jsval sAddListenerID;
|
||||
static PRUint32 mInstanceCount;
|
||||
static jsval sAddListenerID;
|
||||
};
|
||||
|
||||
#endif // nsEventListenerManager_h__
|
||||
|
|
Загрузка…
Ссылка в новой задаче