Firefox desktop tab are also doing something similar but without namespace/weakmaps.
But you used 'atm', so are you targeting to share this getTabForRawTab in a followup patch?