Fix for crashes in EventStateManager that may people are seeing. Bug 27727. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@60753 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2843476366
commit
620f8e6169
@ -552,8 +552,13 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
||||
if (gLastFocusedContent) {
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
gLastFocusedContent->GetDocument(*getter_AddRefs(doc));
|
||||
doc->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
}
|
||||
if(doc)
|
||||
doc->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
else {
|
||||
mDocument->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
NS_RELEASE(gLastFocusedContent);
|
||||
}
|
||||
}
|
||||
else mDocument->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
|
||||
// Suppress the command dispatcher for the duration of the
|
||||
|
||||
@ -552,8 +552,13 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
|
||||
if (gLastFocusedContent) {
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
gLastFocusedContent->GetDocument(*getter_AddRefs(doc));
|
||||
doc->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
}
|
||||
if(doc)
|
||||
doc->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
else {
|
||||
mDocument->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
NS_RELEASE(gLastFocusedContent);
|
||||
}
|
||||
}
|
||||
else mDocument->GetScriptGlobalObject(getter_AddRefs(ourGlobal));
|
||||
|
||||
// Suppress the command dispatcher for the duration of the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user