Bug 1802511 Comment 9 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Aha, we have https://searchfox.org/mozilla-central/rev/d2fa2b9615dd8460b079804d0075180f689d2ba6/caps/BasePrincipal.cpp#1185-1199
That should help with the weird Thunderbird only nsIURIWithSpecialOrigin.
But there is also IS_ORIGIN_IS_FULL_SPEC_DEFINED for TB. That all makes the code ... complicated..

First we try to generate the origin using https://searchfox.org/mozilla-central/rev/d2fa2b9615dd8460b079804d0075180f689d2ba6/caps/ContentPrincipal.cpp#118 but later, if the uri implements nsIURIWithSpecialOrigin, that value isn't used at all, but instead the origin is created using that interface.
https://searchfox.org/mozilla-central/rev/d2fa2b9615dd8460b079804d0075180f689d2ba6/caps/BasePrincipal.cpp#1170,1196-1197
Just a teeny-tiny error prone and weird setup.

Back to Bug 1802511 Comment 9