It might be nice to know which tabs are in which content processes. It seems like nsITabParent would be a good way to expose that to the frontend.
I think a nice way to do this would be to link the frame message manager with the process message manager. That fits well with our existing abstractions.
How could you link fmm to pmm? There are process specific process mms underneath global process message manager, and frame mms are children of window level mm. Do you mean there would be fmm.processManager or some such ?
Yes. If |fmm| is a leaf-level frame message manager, then fmm.processMessageManager would link to a leaf-level process message manager.
Hey snorp, I'm not sure what your end-game is here, but it might be sufficient to know the "child ID" for each tab, as opposed to the process ID. You can access the childID off of the frameloader: https://dxr.mozilla.org/mozilla-central/rev/8cb42e7a16b42162c9930f37b9e1f820c2eb126b/dom/base/nsIFrameLoader.idl#187 Accessed like so: tab.linkedBrowser.frameLoader.childID
I'd like this API so I could figure out which plugin-container to debug when a tab is hung. I've got a hung tab right now and I don't know how to map that to a process. (I also mused a while back that I'd like an API so I could write a "restart this tab's process" extension.)
Created attachment 8775589 [details] [diff] [review] expose processId on nsITabParent. v1 (In reply to Bill McCloskey (:billm) from comment #1) > I think a nice way to do this would be to link the frame message manager > with the process message manager. That fits well with our existing > abstractions. I'm not sure why would we need to do that here... It seems like we just need the process ID of the child on the parent side which is already available, or am I missing something?
Comment on attachment 8775589 [details] [diff] [review] expose processId on nsITabParent. v1 Review of attachment 8775589 [details] [diff] [review]: ----------------------------------------------------------------- I guess this solves Ted's problem. I don't really like using OS PIDs because they can be reused. But that's the only way we're going to solve Ted's problem. ::: dom/interfaces/base/nsITabParent.idl @@ +53,5 @@ > void suppressDisplayport(in bool aEnabled); > > readonly attribute uint64_t tabId; > > + readonly attribute int32_t processId; Let's call this osPid.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/3db67e31e84d Expose OS Pid in nsITabParent. r=billm