Skip to content

Instantly share code, notes, and snippets.

@kmaglione

kmaglione/stdin

Created Jul 30, 2019
Embed
What would you like to do?
12:26:36
<agi> copying from #fission:
12:26:36
<agi> Hi Everyone! I have a question about Actors, hopefully this is the right place.
12:26:36
<agi> Background: I'm on the GeckoView team and I'm looking into moving our modules to Actors.
12:26:36
<agi> Question: In some of our modules we need to do some initialization work, in particular we need to set some properties on docShell at startup, e.g. webBrowserChrome here: https://searchfox.org/mozilla-central/rev/38c88cbf4be87dfa0636d15a5d3599a8ea0d1a72/mobile/android/chrome/geckoview/GeckoViewNavigationChild.js#33-36 . Where would initialization code that
12:26:36
<agi> uses docShell go in an Actor? From what I can see on Desktop this property is set on a script that's loaded using loadFrameScript, but my understanding is that loadFrameScript is going away, correct?
12:26:48
<•neha> awesome, you did that already! \o/
12:26:51
<agi> :)
12:27:37
<agi> I was just thinking that maybe the |constructor| of the module might just work?
12:28:49
<•John-Galt> agi: In the constructor, yes. But modules are initialized lazily, so it really depends on how early that needs to be set, and how the actor's initialization is triggered
12:29:18
<•John-Galt> It might make more sense to have the docshell just get the actor by name when it needs that property instead
12:29:58 *** neha invited mconley into the channel
12:30:03
<•John-Galt> (And, yes, loadFrameScript is going away)
12:30:05
<agi> John-Galt: I see. Yeah we need it as soon as possible, because we need to intercept any load request and send it to the GeckoView embedder (and other similar stuff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.