Closed Bug 1642867 Opened 4 years ago Closed 2 years ago

Remove usage of BrowsingContext.get()

Categories

(Remote Protocol :: Marionette, task, P3)

task

Tracking

(Not tracked)

RESOLVED WORKSFORME

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.

Fission Future. Doesn't block shipping Fission MVP.

The preferred way is to pass around BrowsingContexts directly instead of IDs.

Fission Milestone: --- → Future

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.

Mentor: hskupin
Priority: P2 → P3
Summary: Remove usage of BrowsingContext.get → Remove usage of BrowsingContext.get()
Whiteboard: [lang=js]
Fission Milestone: Future → ---

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.

https://searchfox.org/mozilla-central/search?q=BrowsingContext.get%28&path=remote%2Fmarionette&case=false&regexp=false

As such there is nothing left to do here.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.