Bug 281139, crash doing onfocus=alert() and Reloading, r+sr=bz

git-svn-id: svn://10.0.0.236/trunk@188230 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Olli.Pettay%helsinki.fi 2006-01-26 16:12:30 +00:00
parent e097af5559
commit 742915ebab

View File

@ -803,7 +803,9 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
nsCOMPtr<nsIDocument> document = GetDocumentFromWindow(focusedWindow);
if (document) {
nsIPresShell *shell = document->GetShellAt(0);
// Use a strong ref to make sure that the shell is alive still
// when calling FrameSelection().
nsCOMPtr<nsIPresShell> shell = document->GetShellAt(0);
NS_ASSERTION(shell, "Focus events should not be getting thru when this is null!");
if (shell) {
if (focusedElement) {