Bug #381992 --> thunderbird & seamonkey leak a js context when re-rooting the msg pane dochell.

r=neil
This commit is contained in:
scott%scott-macgregor.org 2007-08-14 22:57:09 +00:00
Родитель 0e88c8be97
Коммит 9a5d34db9b
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -692,6 +692,9 @@ function UpdateMailPaneConfig(aMsgWindowInitialized) {
ClearAttachmentList();
var messagePaneSplitter = GetThreadAndMessagePaneSplitter();
var desiredParent = document.getElementById(desiredId);
// See Bug 381992. The ctor for the browser element will fire again when we re-insert the messagePaneBox back into the document.
// But the dtor doesn't fire when the element is removed from the document. Manually call destroy here to avoid a nasty leak.
getMessageBrowser().destroy();
desiredParent.appendChild(messagePaneSplitter);
desiredParent.appendChild(messagePane);
messagePaneSplitter.orient = desiredParent.orient;

Просмотреть файл

@ -674,6 +674,9 @@ function UpdateMailPaneConfig() {
ClearAttachmentList();
var messagePaneSplitter = GetThreadAndMessagePaneSplitter();
var desiredParent = document.getElementById(desiredId);
// See Bug 381992. The ctor for the browser element will fire again when we re-insert the messagePaneBox back into the document.
// But the dtor doesn't fire when the element is removed from the document. Manually call destroy here to avoid a nasty leak.
getMessageBrowser().destroy();
desiredParent.appendChild(messagePaneSplitter);
desiredParent.appendChild(messagePane);
messagePaneSplitter.orient = desiredParent.orient;