Index: Source/core/html/parser/BackgroundHTMLParser.cpp |
diff --git a/Source/core/html/parser/BackgroundHTMLParser.cpp b/Source/core/html/parser/BackgroundHTMLParser.cpp |
index 0b2d141e3020c4029dce6e62956a2517c462dd8b..c650b14b1a6ae250f0144692b848b464a439a258 100644 |
--- a/Source/core/html/parser/BackgroundHTMLParser.cpp |
+++ b/Source/core/html/parser/BackgroundHTMLParser.cpp |
@@ -29,6 +29,7 @@ |
#include "core/html/parser/HTMLDocumentParser.h" |
#include "core/html/parser/TextResourceDecoder.h" |
#include "core/html/parser/XSSAuditor.h" |
+#include "platform/scheduler/Scheduler.h" |
#include "wtf/MainThread.h" |
#include "wtf/text/TextPosition.h" |
@@ -267,7 +268,9 @@ void BackgroundHTMLParser::sendTokensToMainThread() |
chunk->tokens = m_pendingTokens.release(); |
chunk->startingScript = m_startingScript; |
m_startingScript = false; |
- callOnMainThread(bind(&HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser, m_parser, chunk.release())); |
+ |
+ Scheduler::shared()->postLoadingTask( |
+ FROM_HERE, bind(&HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser, m_parser, chunk.release())); |
m_pendingTokens = adoptPtr(new CompactHTMLTokenStream); |
} |