Bug 372247, crash simulating key events on a window with no frame, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@221194 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -261,8 +261,11 @@ nsDOMWindowUtils::GetWidget()
|
||||
if (docShell) {
|
||||
nsCOMPtr<nsIPresShell> presShell;
|
||||
docShell->GetPresShell(getter_AddRefs(presShell));
|
||||
if (presShell)
|
||||
return presShell->GetRootFrame()->GetWindow();
|
||||
if (presShell) {
|
||||
nsIFrame* frame = presShell->GetRootFrame();
|
||||
if (frame)
|
||||
return frame->GetWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user