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

Unified Diff: Source/core/html/parser/XSSAuditor.cpp

Issue 22909053: Store the Document's encoding on the Document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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: Source/core/html/parser/XSSAuditor.cpp
diff --git a/Source/core/html/parser/XSSAuditor.cpp b/Source/core/html/parser/XSSAuditor.cpp
index a4fa2944e34ec77bb35fd80695ab783d682e524f..8e5246bfa832f531df7436e59a8fb79f6c06746c 100644
--- a/Source/core/html/parser/XSSAuditor.cpp
+++ b/Source/core/html/parser/XSSAuditor.cpp
@@ -257,8 +257,8 @@ void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate)
return;
}
- if (document->decoder())
- m_encoding = document->decoder()->encoding();
+ if (document->encoding().isValid())
+ m_encoding = document->encoding();
abarth-chromium 2013/08/23 21:58:01 Presumably we can just set this unconditionally.
m_decodedURL = fullyDecodeString(m_documentURL.string(), m_encoding);
if (m_decodedURL.find(isRequiredForInjection) == notFound)

Powered by Google App Engine
This is Rietveld 408576698