Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Unified Diff: third_party/WebKit/Source/core/xml/DOMParser.cpp

Issue 2028513002: Set origin for DOMParser documents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding testcase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/xml/DOMParser.cpp
diff --git a/third_party/WebKit/Source/core/xml/DOMParser.cpp b/third_party/WebKit/Source/core/xml/DOMParser.cpp
index 1ed6d4fdfed2e89cf36fa7aebe04b62849ce735a..3d61daaac87c2d4dff701a55c6597d509297811f 100644
--- a/third_party/WebKit/Source/core/xml/DOMParser.cpp
+++ b/third_party/WebKit/Source/core/xml/DOMParser.cpp
@@ -27,6 +27,7 @@ Document* DOMParser::parseFromString(const String& str, const String& type)
{
Document* doc = DOMImplementation::createDocument(type, DocumentInit(KURL(), nullptr, m_contextDocument), false);
doc->setContent(str);
+ doc->setSecurityOrigin(m_contextDocument->getSecurityOrigin());
return doc;
}

Powered by Google App Engine
This is Rietveld 408576698