Bug 430394, r+sr=roc
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Tue, 09 Sep 2008 12:00:02 +0300
changeset 19009 f5c472568bf38d3936a570df1a30e8abe1002e7a
parent 19008 d3342a3cc67758cbed2316746ab33e35d0043840
child 19010 4a3db9fd347995b214ae7bfd7e54837b2d1b1fc7
push id1904
push useropettay@mozilla.com
push dateTue, 09 Sep 2008 09:00:54 +0000
treeherdermozilla-central@f5c472568bf3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs430394
milestone1.9.1b1pre
Bug 430394, r+sr=roc
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
@@ -539,17 +539,19 @@ NS_IMETHODIMP nsTreeBodyFrame::SetView(n
       sel->SetTree(mTreeBoxObject);
     }
     else {
       NS_NewTreeSelection(mTreeBoxObject, getter_AddRefs(sel));
       mView->SetSelection(sel);
     }
 
     // View, meet the tree.
+    nsWeakFrame weakFrame(this);
     mView->SetTree(mTreeBoxObject);
+    NS_ENSURE_STATE(weakFrame.IsAlive());
     mView->GetRowCount(&mRowCount);
  
     PRBool isInReflow;
     PresContext()->PresShell()->IsReflowLocked(&isInReflow);
     if (!isInReflow) {
       // The scrollbar will need to be updated.
       FullScrollbarsUpdate(PR_FALSE);
     } else if (!mReflowCallbackPosted) {