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

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

Issue 14327009: XSSAuditor performance regression in M26 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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
« no previous file with comments | « Source/core/html/parser/XSSAuditor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/XSSAuditor.cpp
diff --git a/Source/core/html/parser/XSSAuditor.cpp b/Source/core/html/parser/XSSAuditor.cpp
index e9d1b64b6dc92ed380b8bfc47af66c6c962e3815..57e7e48f00569188c20eda374f6e4147560a8ff3 100644
--- a/Source/core/html/parser/XSSAuditor.cpp
+++ b/Source/core/html/parser/XSSAuditor.cpp
@@ -227,6 +227,16 @@ XSSAuditor::XSSAuditor()
// we want to reference might not all have been constructed yet.
}
+void XSSAuditor::initForFragment()
+{
+ ASSERT(isMainThread());
+ ASSERT(m_state == Uninitialized);
+ m_state = Initialized;
+ // When parsing a fragment, we don't enable the XSS auditor because it's
+ // too much overhead.
+ ASSERT(!m_isEnabled);
+}
+
void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate)
{
const size_t miniumLengthForSuffixTree = 512; // FIXME: Tune this parameter.
« no previous file with comments | « Source/core/html/parser/XSSAuditor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698