Bug 550029. Don't try to run treeview script if the document global object has gone away. r=smaug

This commit is contained in:
Robert O'Callahan 2010-04-01 20:32:13 +13:00
parent 2cbbdbeb28
commit 60517b697a

View File

@ -2813,7 +2813,9 @@ nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsresult rv = nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
NS_ENSURE_SUCCESS(rv, rv);
if (!mView)
// Bail out now if there's no view or we can't run script because the
// document is a zombie
if (!mView || !GetContent()->GetCurrentDoc()->GetScriptGlobalObject())
return NS_OK;
return aLists.Content()->AppendNewToTop(new (aBuilder)