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. |