BondOpenPGP.jsm is loaded as both a module and a content script
Categories
(MailNews Core :: Security: OpenPGP, defect)
Tracking
(thunderbird_esr78 fixed, thunderbird81 fixed)
People
(Reporter: standard8, Assigned: KaiE)
References
Details
(Keywords: memory-footprint, perf)
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
rjl
:
approval-comm-beta+
wsmwk
:
approval-comm-esr78+
|
Details | Review |
BondOpenPGP.jsm is currently loaded as both a jsm file and a script, e.g.
https://searchfox.org/comm-central/rev/689a37ca900cfb1f45f6b83f1c8e258103ad026e/mail/base/content/messageWindow.xhtml#113
https://searchfox.org/comm-central/rev/689a37ca900cfb1f45f6b83f1c8e258103ad026e/mail/extensions/am-e2e/am-e2e.js#19
This will cause per-window duplication in memory, and the init()
function to be run each time a new window is opened.
It could also potentially confused developers that are expecting it to be loaded as a jsm and only one instance created, but then find it is loaded multiple times.
Assignee | ||
Comment 1•4 years ago
|
||
Mark, can you suggest a strategy to fix this?
Assignee | ||
Comment 2•4 years ago
|
||
I'm guessing it's best to remove all src= statements in .xhtml files, and only use import from .js* files.
Assignee | ||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/fec5c1cd8675
Load BondOpenPGP.jsm as module only, not as content script. r=mkmelin
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Comment on attachment 9172151 [details]
Bug 1660687 - Load BondOpenPGP.jsm as module only, not as content script. r=mkmelin
OpenPGP consistency and correctness. Avoids a risk by potentially duplicating internal data in contexts. Minimal new risk, haven't tested all functional areas, the worst is that some functionality throws an exception instead of working.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Comment on attachment 9172151 [details]
Bug 1660687 - Load BondOpenPGP.jsm as module only, not as content script. r=mkmelin
Also needed for comm-beta 82
Assignee | ||
Comment 7•4 years ago
|
||
Note when landing to beta, use the patch as given in the commit from comment 4.
Landing on comm-esr78 requires a slightly merged patch which is the version in phabricator.
Assignee | ||
Comment 8•4 years ago
|
||
Comment 9•4 years ago
|
||
Comment on attachment 9172151 [details]
Bug 1660687 - Load BondOpenPGP.jsm as module only, not as content script. r=mkmelin
[Triage Comment]
Approved by wsmwk via Matrix on 2020-08-27 for 81.0b2.
Comment 10•4 years ago
|
||
Comment on attachment 9172151 [details]
Bug 1660687 - Load BondOpenPGP.jsm as module only, not as content script. r=mkmelin
[Triage Comment]
Approved for esr78
Assignee | ||
Comment 11•4 years ago
|
||
Assignee | ||
Comment 12•4 years ago
|
||
Unfortunately this change broke the Enigmail migrator. (It fails when clicking the start migration button.)
Confirmed by local backout.
I'm checking if this could be fixed by a change to Enigmail.
Assignee | ||
Comment 13•4 years ago
|
||
Filed bug 1661967 to track the regression
Reporter | ||
Updated•4 years ago
|
Description
•