Bug 643786 - Fix a crash caused by the HTML editor being destroyed when the document modified handler is in progress [@ nsHTMLEditRules::~nsHTMLEditRules]; r=roc
This commit is contained in:
@@ -9205,6 +9205,10 @@ nsHTMLEditRules::DocumentModifiedWorker()
|
||||
if (!mHTMLEditor) {
|
||||
return;
|
||||
}
|
||||
|
||||
// DeleteNode below may cause a flush, which could destroy the editor
|
||||
nsAutoRemovableScriptBlocker scriptBlocker;
|
||||
|
||||
nsCOMPtr<nsIHTMLEditor> kungFuDeathGrip(mHTMLEditor);
|
||||
nsCOMPtr<nsISelection> selection;
|
||||
nsresult res = mHTMLEditor->GetSelection(getter_AddRefs(selection));
|
||||
|
||||
Reference in New Issue
Block a user