Fix for bug 430624 (Crash [@ nsDocShellEditorData::DetachFromWindow] with spellcheck attribute). Patch by cpearce, r=peterv, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@251098 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -73,12 +73,12 @@ nsDocShellEditorData::~nsDocShellEditorData()
|
||||
void
|
||||
nsDocShellEditorData::TearDownEditor()
|
||||
{
|
||||
NS_ASSERTION(mIsDetached, "We should be detached before tearing down");
|
||||
if (mEditor) {
|
||||
mEditor->PreDestroy();
|
||||
mEditor = nsnull;
|
||||
}
|
||||
mEditingSession = nsnull;
|
||||
mIsDetached = PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -244,12 +244,16 @@ nsDocShellEditorData::DetachFromWindow()
|
||||
if (htmlDoc)
|
||||
mDetachedEditingState = htmlDoc->GetEditingState();
|
||||
|
||||
mDocShell = nsnull;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDocShellEditorData::ReattachToWindow(nsIDOMWindow *aWindow)
|
||||
nsDocShellEditorData::ReattachToWindow(nsIDocShell* aDocShell)
|
||||
{
|
||||
mDocShell = aDocShell;
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> domWindow = do_GetInterface(mDocShell);
|
||||
nsresult rv = mEditingSession->ReattachToWindow(domWindow);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
Reference in New Issue
Block a user