зеркало из https://github.com/mozilla/gecko-dev.git
bug 1470306, DOMEventTargetHelper object should be kept alive while calling DisconnectFromOwner, r=bkelly
This commit is contained in:
Родитель
891b94e2c0
Коммит
12b00cb590
|
@ -150,7 +150,7 @@ nsIGlobalObject::ForEachEventTargetObject(const std::function<void(DOMEventTarge
|
|||
// Protect against the function call triggering a mutation of the list
|
||||
// while we are iterating by copying the DETH references to a temporary
|
||||
// list.
|
||||
AutoTArray<DOMEventTargetHelper*, 64> targetList;
|
||||
AutoTArray<RefPtr<DOMEventTargetHelper>, 64> targetList;
|
||||
for (const DOMEventTargetHelper* deth = mEventTargetObjects.getFirst();
|
||||
deth; deth = deth->getNext()) {
|
||||
targetList.AppendElement(const_cast<DOMEventTargetHelper*>(deth));
|
||||
|
|
Загрузка…
Ссылка в новой задаче