Bug 1928031 - clean out load-enigmail/load-enigmail. r=kaie
- load-engimail and unload-engimail events did not exist anymore - onUnloadEnigmail was only called from those event handlers, calling it would have caused excptions as Enigmail.columnHandler.onUnloadEnigmail and Enigmail.hdrView.onUnloadEnigmail also no longer existed - messageCleanup() was only called from messageFrameUnload() Differential Revision: https://phabricator.services.mozilla.com/D227817
This commit is contained in:
Родитель
7e36cd0f1c
Коммит
b7872de632
|
@ -171,7 +171,11 @@ Enigmail.msg = {
|
|||
ReloadMessage();
|
||||
},
|
||||
|
||||
messageCleanup() {
|
||||
/**
|
||||
* Handle messagePane "unload" event.
|
||||
*/
|
||||
messageFrameUnload() {
|
||||
Enigmail.msg.savedHeaders = null;
|
||||
for (const value of [
|
||||
"decryptInlinePGReminder",
|
||||
"decryptInlinePG",
|
||||
|
@ -220,11 +224,6 @@ Enigmail.msg = {
|
|||
Enigmail.msg.buggyMailType = null;
|
||||
},
|
||||
|
||||
messageFrameUnload() {
|
||||
Enigmail.msg.savedHeaders = null;
|
||||
Enigmail.msg.messageCleanup();
|
||||
},
|
||||
|
||||
getCurrentMsgUriSpec() {
|
||||
return gMessageURI || "";
|
||||
},
|
||||
|
@ -2151,41 +2150,6 @@ Enigmail.msg = {
|
|||
);
|
||||
},
|
||||
|
||||
onUnloadEnigmail() {
|
||||
window.removeEventListener(
|
||||
"unload-enigmail",
|
||||
Enigmail.msg.onUnloadEnigmail
|
||||
);
|
||||
window.removeEventListener("load-enigmail", Enigmail.msg.messengerStartup);
|
||||
|
||||
this.messageCleanup();
|
||||
|
||||
if (this.messagePane) {
|
||||
this.messagePane.removeEventListener(
|
||||
"unload",
|
||||
Enigmail.msg.messageFrameUnload,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
for (const c of this.changedAttributes) {
|
||||
const elem = document.getElementById(c.id);
|
||||
if (elem) {
|
||||
elem.setAttribute(c.attrib, c.value);
|
||||
}
|
||||
}
|
||||
|
||||
if (Enigmail.columnHandler) {
|
||||
Enigmail.columnHandler.onUnloadEnigmail();
|
||||
}
|
||||
if (Enigmail.hdrView) {
|
||||
Enigmail.hdrView.onUnloadEnigmail();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-global-assign
|
||||
Enigmail = undefined;
|
||||
},
|
||||
|
||||
/**
|
||||
* Process key data from a message.
|
||||
*
|
||||
|
@ -2996,12 +2960,3 @@ Enigmail.msg = {
|
|||
!showExtraKeysList;
|
||||
},
|
||||
};
|
||||
|
||||
window.addEventListener(
|
||||
"load-enigmail",
|
||||
Enigmail.msg.messengerStartup.bind(Enigmail.msg)
|
||||
);
|
||||
window.addEventListener(
|
||||
"unload-enigmail",
|
||||
Enigmail.msg.onUnloadEnigmail.bind(Enigmail.msg)
|
||||
);
|
||||
|
|
|
@ -825,8 +825,3 @@ var openpgpSink = {
|
|||
return false;
|
||||
},
|
||||
};
|
||||
|
||||
window.addEventListener(
|
||||
"load-enigmail",
|
||||
Enigmail.hdrView.hdrViewLoad.bind(Enigmail.hdrView)
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче