Bug 1168223 - Fix a crash caused by unexpected flushes under nsIEditor::SetFlags. r=ehsan

This commit is contained in:
Blake Kaplan 2015-06-25 13:58:01 -07:00
parent 21c7918907
commit dc360b12a8

View File

@ -1069,6 +1069,11 @@ nsEditorEventListener::Focus(nsIDOMEvent* aEvent)
// Spell check a textarea the first time that it is focused.
SpellCheckIfNeeded();
if (!mEditor) {
// In e10s, this can cause us to flush notifications, which can destroy
// the node we're about to focus.
return NS_OK;
}
nsCOMPtr<nsIDOMEventTarget> target;
aEvent->GetTarget(getter_AddRefs(target));