Index: Source/core/html/parser/BackgroundHTMLParser.cpp |
diff --git a/Source/core/html/parser/BackgroundHTMLParser.cpp b/Source/core/html/parser/BackgroundHTMLParser.cpp |
index 6bbde221f630ccffd2b751657d30d90b8b94c09b..024946cd8e1e3378d4bcc45c5d54d308222d62c4 100644 |
--- a/Source/core/html/parser/BackgroundHTMLParser.cpp |
+++ b/Source/core/html/parser/BackgroundHTMLParser.cpp |
@@ -223,13 +223,17 @@ void BackgroundHTMLParser::pumpTokenizer() |
return; |
while (true) { |
- m_sourceTracker.start(m_input.current(), m_tokenizer.get(), *m_token); |
+ if (m_xssAuditor->isEnabled()) |
+ m_sourceTracker.start(m_input.current(), m_tokenizer.get(), *m_token); |
+ |
if (!m_tokenizer->nextToken(m_input.current(), *m_token)) { |
// We've reached the end of our current input. |
sendTokensToMainThread(); |
break; |
} |
- m_sourceTracker.end(m_input.current(), m_tokenizer.get(), *m_token); |
+ |
+ if (m_xssAuditor->isEnabled()) |
+ m_sourceTracker.end(m_input.current(), m_tokenizer.get(), *m_token); |
{ |
TextPosition position = TextPosition(m_input.current().currentLine(), m_input.current().currentColumn()); |
@@ -239,7 +243,7 @@ void BackgroundHTMLParser::pumpTokenizer() |
m_pendingXSSInfos.append(xssInfo.release()); |
} |
- CompactHTMLToken token(m_token.get(), TextPosition(m_input.current().currentLine(), m_input.current().currentColumn())); |
+ CompactHTMLToken token(m_token.get(), position); |
m_preloadScanner->scan(token, m_input.current(), m_pendingPreloads); |
simulatedToken = m_treeBuilderSimulator.simulate(token, m_tokenizer.get()); |