[webkit-dev] Why do both DOMWindow and Document objects hold SecurityOrigin objects?

Sam Weinig sam.weinig at gmail.com
Tue Dec 7 12:16:01 PST 2010

It is for historical reasons that both have an origin.  The idea was that we
were going to move the DOMWindow to be owned by the Document, and when that
was done, remove the DOMWindow's origin.  I seem to remember there being a
theoretical time when the two could differ, but looking
at DocumentWriter::begin() now, it seems like we always set both to the same
value.  I still think the re-factor to make Document own DOMWindow would
make this much clearer.


On Tue, Dec 7, 2010 at 11:53 AM, Darin Adler <darin at apple.com> wrote:

> Why does both a DOMWindow and a Document hold a securityOrigin? Is there a
> way we can get rid of one or the other? Are the two equivalent, or is there
> a difference? Is there a time when it’s correct to do
> frame->domWindow()->securityOrigin() and incorrect to do
> frame->document()->securityOrigin(), or vice versa?
>    -- Darin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101207/2e0bb567/attachment.html>

More information about the webkit-dev mailing list