Previously, we were simply having a flag on the ContentProcessConnector
that we would flip once we loaded the content process server startup script.
This was working fine until multi-proxy browser console.
Each time we open the Browser Console, we create a new loader in a new
compartment. Which means in the end we'll have a new ContentProcessConnector
instance, and the flag would be resetted, and thus we would load a new
content process server startup script, which finally, would emit some
packet twice, and thus would break how we manage new packet in the client.
This patch fixes that by replacing the flag by checking if the script
was already loaded.
Differential Revision: https://phabricator.services.mozilla.com/D43618
--HG--
extra : moz-landing-system : lando