On Thu, May 14, 2015 at 12:18 PM, <nsm.nik...@gmail.com> wrote: > 1. What information do dependent APIs need to store? I can think of: > a) appID > b) inBrowserElement > c) origin > d) scope > e) (optional) manifestURL when appID is not UNKNOWN? > Can any or all of these be replaced by a nsIPrincipal and something else? >
Serendipitously, I'm making this situation a lot easier in bug 1163254. The idea is that nsIPrincipal::origin will also serialize all of the security-sensitive differentiators (appId, inBrowserElement, etc), so you can just consult that if you need a canonical stringified representation of the origin. If you eventually need to convert it _back_ to an nsIPrincipal, you should probably use the nsISerializable stuff instead. It's a bit of a pain to use right now, though we could add a helper. bholley _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform