The global map is just used to pass data (the browser and the URL, later also a callback) to the new protocolhandler instance.
Basically I just need a global object to pass this data. But since multiple requests can happen on multiple threads / multiple browsers at the same time I provided the map to have one global object per thread. Using threadlocalstorage would also be a possibility, but this is more complicated and errorprone.