IIUC Currently SecurityOrigin can be shared multiple documents and thus modification to a SecurityOrigin can affect other Document's SecurityOrigin.
I'm not sure this can cause real problems, but am anyway planning to clean up this issue.
Doc:
https://docs.google.com/a/chromium.org/document/d/1xdAt7h14bEgCacDxTnOC_wzF6jYMwbqYy0GaOT4cpX4/edit?usp=sharing
Please let me know if
- I'm missing something,
- there're cases where multiple Documents/SecurityContexts should share SecurityOrigin and its modifications, or
- this causes real problems.
You've apparently realized this already (sorry I was OOO), but we intentionally share the origin object in some cases where the HTML spec suggests "aliasing" the origin rather than copying it (`srcdoc`, for instance).
+dcheng@ who knows all about the messy detail here.
Thanks for comments.
I prepared CLs that makes most of SecurityOrigin references const without changing behavior including aliasing (i.e. essentially manipulating types and related interfaces only).
Comment 1 by kouhei@chromium.org
, Oct 31 2017