This patch also adds a workaround for avoid a timing issue. The timing issue exists if we close and rapidly open again of a given origin which is using a shared worker with container enabled. The showdown of the content process would be delayed in this case, so the content process will be shutdown during opening the tab, which would lead to an unexpected behavior. The workaround makes the script to wait the shutdown process to be finished. Depends on D49244 Differential Revision: https://phabricator.services.mozilla.com/D49245