Open Bug 1596254 Opened 1 year ago Updated 2 months ago

Reconcile null handling of ContentParent::GetNewOrUsedBrowserProcess and ProcessSelector.jsm


(Core :: DOM: Content Processes, task, P2)





(Reporter: mccr8, Unassigned)




(1 obsolete file)

As seen in bug 1585114, the array that is passed to the provideProcess() method of nsIContentProcessProvider can contain nulls, if there is a process that is in the middle of being shut down. The two non-trivial implementations of that method in ProcessSelector.jsm don't deal with that, so they end up failing.

A clean fix would be to not pass nulls in the array we pass to provideProcess(), but that would require some additional work to map the index that provideProcess() returns to the list of content parents in C++. It would also require figuring out what exactly the max count argument is, and how that should be adjusted.

The simple fix would be to add null checks to the two implementations in ProcessSelector.jsm and just leave the C++ alone.

(While this issue is part of what was going wrong in bug 1585114, the fix I landed there should be sufficient to fix the intermittent failure.)

If a process is in the middle of shutting down, it will show up as
null in the processes array.

Attachment #9110025 - Attachment is obsolete: true
Assignee: continuation → nobody
You need to log in before you can comment on or make changes to this bug.