зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1677194 - Avoid accessing invalidated frame. r=emilio
MANUAL PUSH: Author doesn't use Phabricator.
This commit is contained in:
Родитель
d99446355a
Коммит
c892462ee7
|
@ -1598,10 +1598,17 @@ nsresult nsTreeBodyFrame::RowCountChanged(int32_t aIndex, int32_t aCount) {
|
|||
}
|
||||
#endif // #ifdef ACCESSIBILITY
|
||||
|
||||
AutoWeakFrame weakFrame(this);
|
||||
|
||||
// Adjust our selection.
|
||||
nsCOMPtr<nsITreeView> view = mView;
|
||||
nsCOMPtr<nsITreeSelection> sel;
|
||||
mView->GetSelection(getter_AddRefs(sel));
|
||||
if (sel) sel->AdjustSelection(aIndex, aCount);
|
||||
view->GetSelection(getter_AddRefs(sel));
|
||||
if (sel) {
|
||||
sel->AdjustSelection(aIndex, aCount);
|
||||
}
|
||||
|
||||
NS_ENSURE_STATE(weakFrame.IsAlive());
|
||||
|
||||
if (mUpdateBatchNest) return NS_OK;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче