зеркало из https://github.com/mozilla/pjs.git
Simple check for null fix for a crasher that some people are seeing quite a lot today. It is reflected in bug 22024. R= waterson, a= chofmann
This commit is contained in:
Родитель
8191b265b9
Коммит
8c44b2b1a8
|
@ -1925,6 +1925,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext, nsIContent *aCo
|
|||
// the Ender widget case.
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
gLastFocusedContent->GetDocument(*getter_AddRefs(doc));
|
||||
if(doc) {
|
||||
nsCOMPtr<nsIPresShell> shell = getter_AddRefs(doc->GetShellAt(0));
|
||||
nsCOMPtr<nsIPresContext> oldPresContext;
|
||||
shell->GetPresContext(getter_AddRefs(oldPresContext));
|
||||
|
@ -1941,6 +1942,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext, nsIContent *aCo
|
|||
gLastFocusedContent->HandleDOMEvent(oldPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
esm->SetFocusedContent(nsnull);
|
||||
}
|
||||
}
|
||||
|
||||
// Go ahead and fire a blur on the window.
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObject;
|
||||
|
|
|
@ -1925,6 +1925,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext, nsIContent *aCo
|
|||
// the Ender widget case.
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
gLastFocusedContent->GetDocument(*getter_AddRefs(doc));
|
||||
if(doc) {
|
||||
nsCOMPtr<nsIPresShell> shell = getter_AddRefs(doc->GetShellAt(0));
|
||||
nsCOMPtr<nsIPresContext> oldPresContext;
|
||||
shell->GetPresContext(getter_AddRefs(oldPresContext));
|
||||
|
@ -1941,6 +1942,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext, nsIContent *aCo
|
|||
gLastFocusedContent->HandleDOMEvent(oldPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
esm->SetFocusedContent(nsnull);
|
||||
}
|
||||
}
|
||||
|
||||
// Go ahead and fire a blur on the window.
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObject;
|
||||
|
|
Загрузка…
Ссылка в новой задаче