Remove usage of BrowsingContext.get()
Categories
(Remote Protocol :: Marionette, task, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned, Mentored)
References
Details
(Whiteboard: [lang=js])
As follow-up from bug 1519335:
(In reply to Kris Maglione [:kmag] from comment #31)
There shouldn't be. We do sometimes lazily create browsing contexts without immediately registering them, but by the time you see them from JS, they should be registered. It's possible that the BrowsingContext you're dealing with has been destroyed, though...
That said, you should generally send BrowsingContext objects rather than IDs. We've generally been trying to discourage use of
BrowsingContext.get
from JS.
Comment 1•4 years ago
|
||
Fission Future. Doesn't block shipping Fission MVP.
The preferred way is to pass around BrowsingContexts directly instead of IDs.
Reporter | ||
Comment 2•4 years ago
|
||
Note that we cannot remove it until we got rid of the listener framescript. Right now when trying to send a browsing context from listener.js to driver.js we will get a acyclic object error.
Reporter | ||
Comment 3•3 years ago
|
||
There shouldn't be a blocker here anymore. As such we should get Marionette updated to pass the browsing context directly from the child actor to the parent actor:
https://searchfox.org/mozilla-central/rev/4646b826a25d3825cf209db890862b45fa09ffc3/remote/marionette/actors/MarionetteCommandsChild.jsm#517-559
https://searchfox.org/mozilla-central/rev/4646b826a25d3825cf209db890862b45fa09ffc3/remote/marionette/actors/MarionetteCommandsParent.jsm#220-238
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
There are only two instances of BrowsingContext.get()
in Marionette but those cannot be removed due to our custom JSON serialization and deserialization for the parent <-> content JSWindow actors.
As such there is nothing left to do here.
Updated•2 years ago
|
Description
•