Only import the used objects with ChromeUtils.import
Categories
(Chat Core :: General, task)
Tracking
(Not tracked)
People
(Reporter: clokep, Assigned: clokep)
References
Details
Attachments
(1 file)
(deleted),
patch
|
aleca
:
review+
|
Details | Diff | Splinter Review |
Bug 1520643 added all imports to ChromeUtils.import()
when only some are unnecessary. This strips the necessary imports down to only what is used in each file.
Assignee | ||
Comment 1•5 years ago
|
||
This patch does two things:
- Removes all the unnecessary imports.
- Removes some uses of
Services.scriptloader.loadSubScript
which were being used to import publicly exported objects.
To test this I:
- Connected an IRC account.
- Ensure messages could be sent and received.
- Ensured commands run properly (type
/whois aleca
) - Ensured an XMPP account still worked properly.
Assignee | ||
Comment 2•5 years ago
|
||
I should mention that I found unused imports by just searching for each import with my editor on a file-by-file basis.
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
(In reply to Alessandro Castellani (:aleca) from comment #3)
prpl-irc: Failed to convert CAP LS
from Unicode to false.
Do you get any of these errors on master? That seems very suspicious that something changed in character encoding handling... Shouldn't be related to this patch, but I'll do some more testing.
Comment 5•5 years ago
|
||
Yes, I get those errors on trunk without your patch applied.
This should be good to go.
Did you already do a try run just to be sure no test is failing?
Assignee | ||
Comment 6•5 years ago
|
||
(In reply to Alessandro Castellani (:aleca) from comment #5)
Yes, I get those errors on trunk without your patch applied.
This should be good to go.
Can you file a separate issue about that please? I suspect that's a bustage...
Did you already do a try run just to be sure no test is failing?
I ran the chat tests manually.
Pushed by clokep@gmail.com:
https://hg.mozilla.org/comm-central/rev/a094c4ec89ae
Only import the used objects with ChromeUtils.import. r=aleca
Assignee | ||
Comment 8•5 years ago
|
||
I filed bug 1587054 about the errors converting from/to Unicode.
Description
•