Closed
Bug 1590829
Opened 5 years ago
Closed 2 years ago
RemoteAgent.listen() should accept nsIURI instead of AString
Categories
(Remote Protocol :: Agent, defect, P3)
Remote Protocol
Agent
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: ato, Unassigned)
References
Details
Bug 1543115 introduced nsIRemoteAgent.listen(AString address)
,
but we probably want to pass in a nsIURI
instead.
Reporter | ||
Comment 1•5 years ago
•
|
||
Nika helpfully provided some hints how this can be done in D50289:
In general modern xpcom APIs are not designed with rust in mind,
and may not support being called from Rust code. I haven't had any
chances to work on the rust-xpcom bindings since 2 years ago, so I
wouldn't be surprised if they have limited functionality.That being said, I believe the following should work:
- Call
nsIURI::Mutate
to get ansIURIMutator
:
https://searchfox.org/mozilla-central/rev/1fe0cf575841dbf3b7e159e88ba03260cd1354c0/netwerk/base/nsIURI.idl#312-318- Call
nsIURIMutator
methods, such asSetPort
, to change the URI:
https://searchfox.org/mozilla-central/rev/1fe0cf575841dbf3b7e159e88ba03260cd1354c0/netwerk/base/nsIURIMutator.idl#196- Call
nsIURIMutator::finalize
to actually build the newnsIURI
:
https://searchfox.org/mozilla-central/rev/1fe0cf575841dbf3b7e159e88ba03260cd1354c0/netwerk/base/nsIURIMutator.idl#294-298Using these APIs might be a bit inconvenient from rust code, though,
due to how these methods are translated into rust code.
Reporter | ||
Updated•5 years ago
|
Priority: -- → P3
Comment 2•2 years ago
|
||
With the work on bug 1717899 the listen()
method will no longer be available. As such this bug is no longer needed.
You need to log in
before you can comment on or make changes to this bug.
Description
•