On Fri, Aug 26, 2016 at 4:54 PM, Bill McCloskey <
wmccl...@mozilla.com>
wrote:
> Developer tools pose a special challenge here. IIRC, they use a small frame
> script that then loads a bunch of devtools code to implement the tab actor.
> So we would need to change them to use frame actors instead, and then
> modify all the tools to work with frame actors. This seems like a lot of
> work.
>
> I took a look at Chrome's devtools since they already implement an
> experimental out-of-process iframe feature. It looks like the JS tools
> (debugger and console) require you to choose a particular frame in which to
> evaluate code or set a breakpoint. On the other hand, tools like the
> inspector try to present a unified view of the page by aggregating data
> from different frames.
>
I would imagine we would also want our inspector to show a unified view of
the page in an OOP frame world. I think a natural approach would be to try
to make it as "transparent" to the UI as we can. So, there would still be a
single tab actor that the UI connects to. In the server that is running as
part of the frame script for the tab, we would handle the IPC between
different frames and then ship that back to the UI as requested over the
protocol.
For other tools, we might decide to have UI to switch the focused frame (we
already have a frame chooser) and only worry about that frame. We might
still present a single "entry point" tab actor for tools that take this
path, and handle the focused frame internally to the server as well.
This "transparent" approach is similar to how we approach e10s today. When
the UI connects to the server, it starts talking to a component in the main
process. It delegates various communication over IPC to another server in
the tab's frame script, but that forwarding process is hidden from the UI.
>
> I'm writing to ask how much effort it would be to modify our developer
> tools protocols, backend, and UI in the same way. Would it take a month,
> six months, or a year? How many people would be required?
>
It feels like a large project that affects most tools to _some_ degree, but
with varying amounts of effort required per tool depending on how they
choose to present their UI in the OOP frame world.
Is there a schedule for this work on the platform side at this stage?
> Who knows the most about the underlying issues here?
>
I would say myself and Alex Poirot know the most about the general tab
actor structure. Eddy Bruel added worker support, and we'd want to consider
what we learned from that.
I know less about the debugger myself, so people like James Long, Eddy
Bruel, Nick Fitzgerald, Jim Blandy, and Jason Laster would have a better
idea about that area.
> Which tools would need the most
> work? Are there any tools where this just isn't possible or wouldn't make
> sense?
>
Unsure which need the _most_ work yet... I think there's a path forward for
every tool, assuming we want to do the work to convert each one to the OOP
frame world (and we might decide to drop tools with very low usage if their
conversion cost is too great).
- Ryan