Open Bug 1596254 Opened 7 months ago Updated 7 months ago

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

Categories

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

task

Tracking

()

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 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.

You need to log in before you can comment on or make changes to this bug.