[webkit-dev] Why do both DOMWindow and Document objects hold SecurityOrigin objects?
abarth at webkit.org
Tue Dec 7 13:07:47 PST 2010
At the time when we introduced DOMWindow::securityOrigin, there was a
situation where we needed to know the security origin of something but
the document wasn't available. Hopefully that reason has disappeared
and we can remove DOMWindow::securityOrigin.
On Tue, Dec 7, 2010 at 12:16 PM, Sam Weinig <sam.weinig at gmail.com> wrote:
> 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
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
More information about the webkit-dev