OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 4662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4673 initSecurityContext(DocumentInit(m_url, m_frame, contextDocument(), m_import
sController)); | 4673 initSecurityContext(DocumentInit(m_url, m_frame, contextDocument(), m_import
sController)); |
4674 } | 4674 } |
4675 | 4675 |
4676 void Document::initSecurityContext(const DocumentInit& initializer) | 4676 void Document::initSecurityContext(const DocumentInit& initializer) |
4677 { | 4677 { |
4678 if (haveInitializedSecurityOrigin()) { | 4678 if (haveInitializedSecurityOrigin()) { |
4679 ASSERT(securityOrigin()); | 4679 ASSERT(securityOrigin()); |
4680 return; | 4680 return; |
4681 } | 4681 } |
4682 | 4682 |
| 4683 if (initializer.isHostedInReservedIPRange()) |
| 4684 setHostedInReservedIPRange(); |
| 4685 |
4683 if (!initializer.hasSecurityContext()) { | 4686 if (!initializer.hasSecurityContext()) { |
4684 // No source for a security context. | 4687 // No source for a security context. |
4685 // This can occur via document.implementation.createDocument(). | 4688 // This can occur via document.implementation.createDocument(). |
4686 m_cookieURL = KURL(ParsedURLString, emptyString()); | 4689 m_cookieURL = KURL(ParsedURLString, emptyString()); |
4687 setSecurityOrigin(SecurityOrigin::createUnique()); | 4690 setSecurityOrigin(SecurityOrigin::createUnique()); |
4688 initContentSecurityPolicy(); | 4691 initContentSecurityPolicy(); |
4689 return; | 4692 return; |
4690 } | 4693 } |
4691 | 4694 |
4692 // In the common case, create the security context from the currently | 4695 // In the common case, create the security context from the currently |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5762 #ifndef NDEBUG | 5765 #ifndef NDEBUG |
5763 using namespace blink; | 5766 using namespace blink; |
5764 void showLiveDocumentInstances() | 5767 void showLiveDocumentInstances() |
5765 { | 5768 { |
5766 WeakDocumentSet& set = liveDocumentSet(); | 5769 WeakDocumentSet& set = liveDocumentSet(); |
5767 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5770 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5768 for (Document* document : set) | 5771 for (Document* document : set) |
5769 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5772 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5770 } | 5773 } |
5771 #endif | 5774 #endif |
OLD | NEW |