| Index: Source/core/html/parser/HTMLDocumentParser.h
|
| diff --git a/Source/core/html/parser/HTMLDocumentParser.h b/Source/core/html/parser/HTMLDocumentParser.h
|
| index 185ea60687708eaacd528ca5b16e66413116260b..81bf69d2e6a5ff9786ee263ca4caf41773559219 100644
|
| --- a/Source/core/html/parser/HTMLDocumentParser.h
|
| +++ b/Source/core/html/parser/HTMLDocumentParser.h
|
| @@ -40,6 +40,7 @@
|
| #include "core/html/parser/HTMLToken.h"
|
| #include "core/html/parser/HTMLTokenizer.h"
|
| #include "core/html/parser/HTMLTreeBuilderSimulator.h"
|
| +#include "core/html/parser/ParserSynchronizationPolicy.h"
|
| #include "core/html/parser/TextResourceDecoder.h"
|
| #include "core/html/parser/XSSAuditor.h"
|
| #include "core/html/parser/XSSAuditorDelegate.h"
|
| @@ -68,9 +69,9 @@ class HTMLDocumentParser : public ScriptableDocumentParser, private HTMLScriptR
|
| WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
|
| WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser);
|
| public:
|
| - static PassRefPtrWillBeRawPtr<HTMLDocumentParser> create(HTMLDocument& document, bool reportErrors)
|
| + static PassRefPtrWillBeRawPtr<HTMLDocumentParser> create(HTMLDocument& document, bool reportErrors, ParserSynchronizationPolicy backgroundParsingPolicy)
|
| {
|
| - return adoptRefWillBeNoop(new HTMLDocumentParser(document, reportErrors));
|
| + return adoptRefWillBeNoop(new HTMLDocumentParser(document, reportErrors, backgroundParsingPolicy));
|
| }
|
| virtual ~HTMLDocumentParser();
|
| virtual void trace(Visitor*) override;
|
| @@ -112,7 +113,7 @@ protected:
|
| virtual void append(PassRefPtr<StringImpl>) override;
|
| virtual void finish() override final;
|
|
|
| - HTMLDocumentParser(HTMLDocument&, bool reportErrors);
|
| + HTMLDocumentParser(HTMLDocument&, bool reportErrors, ParserSynchronizationPolicy);
|
| HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContentPolicy);
|
|
|
| HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); }
|
| @@ -126,7 +127,6 @@ private:
|
| }
|
|
|
| // DocumentParser
|
| - virtual void pinToMainThread() override final;
|
| virtual void detach() override final;
|
| virtual bool hasInsertionPoint() override final;
|
| virtual bool processingData() const override final;
|
| @@ -165,7 +165,7 @@ private:
|
| void attemptToRunDeferredScriptsAndEnd();
|
| void end();
|
|
|
| - bool shouldUseThreading() const { return !m_isPinnedToMainThread; }
|
| + bool shouldUseThreading() const { return m_shouldUseThreading; }
|
|
|
| bool isParsingFragment() const;
|
| bool isScheduledForResume() const;
|
| @@ -197,7 +197,7 @@ private:
|
| WeakPtr<BackgroundHTMLParser> m_backgroundParser;
|
| OwnPtrWillBeMember<HTMLResourcePreloader> m_preloader;
|
|
|
| - bool m_isPinnedToMainThread;
|
| + bool m_shouldUseThreading;
|
| bool m_endWasDelayed;
|
| bool m_haveBackgroundParser;
|
| bool m_tasksWereSuspended;
|
|
|