Title: [218037] trunk/Source/WebCore
- Revision
- 218037
- Author
- [email protected]
- Date
- 2017-06-09 19:11:30 -0700 (Fri, 09 Jun 2017)
Log Message
Attempt to fix layout test failures following <https://trac.webkit.org/changeset/218028/webkit>
(https://bugs.webkit.org/show_bug.cgi?id=158121)
<rdar://problem/26012994>
For now, if we do not have a frame then consider the document a secure context. One way this can happen
is the page accesses a frame that was removed from the document as demonstrated by the test:
fast/dom/Window/property-access-on-cached-window-after-frame-removed.html. Treating a frameless
document as a secure context also matches Blink's implementation:
<https://chromium.googlesource.com/chromium/src/+/fc202b2b1174f5732f7b9e63a6c46fd01ac2be02/third_party/WebKit/Source/core/dom/Document.cpp#4079>.
* dom/Document.cpp:
(WebCore::Document::isSecureContext):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (218036 => 218037)
--- trunk/Source/WebCore/ChangeLog 2017-06-10 01:14:06 UTC (rev 218036)
+++ trunk/Source/WebCore/ChangeLog 2017-06-10 02:11:30 UTC (rev 218037)
@@ -1,3 +1,18 @@
+2017-06-09 Daniel Bates <[email protected]>
+
+ Attempt to fix layout test failures following <https://trac.webkit.org/changeset/218028/webkit>
+ (https://bugs.webkit.org/show_bug.cgi?id=158121)
+ <rdar://problem/26012994>
+
+ For now, if we do not have a frame then consider the document a secure context. One way this can happen
+ is the page accesses a frame that was removed from the document as demonstrated by the test:
+ fast/dom/Window/property-access-on-cached-window-after-frame-removed.html. Treating a frameless
+ document as a secure context also matches Blink's implementation:
+ <https://chromium.googlesource.com/chromium/src/+/fc202b2b1174f5732f7b9e63a6c46fd01ac2be02/third_party/WebKit/Source/core/dom/Document.cpp#4079>.
+
+ * dom/Document.cpp:
+ (WebCore::Document::isSecureContext):
+
2017-06-09 Ryan Haddad <[email protected]>
Unreviewed, rolling out r218003.
Modified: trunk/Source/WebCore/dom/Document.cpp (218036 => 218037)
--- trunk/Source/WebCore/dom/Document.cpp 2017-06-10 01:14:06 UTC (rev 218036)
+++ trunk/Source/WebCore/dom/Document.cpp 2017-06-10 02:11:30 UTC (rev 218037)
@@ -5323,7 +5323,8 @@
bool Document::isSecureContext() const
{
- ASSERT(m_frame);
+ if (!m_frame)
+ return true;
if (!securityOrigin().isPotentionallyTrustworthy())
return false;
for (Frame* frame = m_frame->tree().parent(); frame; frame = frame->tree().parent()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes