Consumers of the RemoteAgent component have to create an instance and not import it via a chrome:// URI
Categories
(Remote Protocol :: Agent, defect, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
Details
Consumers of the Remote Agent currently include the RemoteAgent.jsm directly instead of creating an instance of the XPCOM interface:
We should update all these instances, which also include our browser chrome tests.
This blocks bug 1690468.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
To get this working we would actually have to change listen()
and close()
to return a Promise (bug 1675471), or make them synchronous. The work here exceeds the planned time for refactoring. As such we will keep the imports as they are for now.
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 2•1 year ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #0)
Consumers of the Remote Agent currently include the RemoteAgent.jsm directly instead of creating an instance of the XPCOM interface:
https://searchfox.org/mozilla-central/rev/40205f1b55f1ba8a26fcbd362c20d843e8718a87/toolkit/modules/Troubleshoot.jsm#956
Not sure if that is really something that we should do. Using the interface certainly adds a probably non-neglectable performance overhead compared to just loading the ESM module. I would tend to say that we should close this bug as wontfix.
Gijs, would you have some feedback for us? How is that done in general for other JS components in Firefox that also have an XPCOM interface? Thanks!
Comment 3•1 year ago
|
||
Wontfixing this seems reasonable to me. I'm not sure there's really a big overhead - none of the crossing of the XPCOM boundary would be hot code for this module, I think?, and perhaps we optimize js-to-js interface use anyway, but I also don't see much downside in keeping the code the way it is now.
Reporter | ||
Comment 4•1 year ago
|
||
Sounds good. Thanks!
Description
•