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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h

Issue 2683653004: Put the BackgroundHTMLParser on oilpan heap (Closed)
Patch Set: remove <memory> Created 3 years, 10 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
Index: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
index c3bc8a9936ac9dfe59211efc5ae94629283c39fb..3615c2f4aa9eef638bffeb958f1f5ecbb853e661 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
@@ -26,6 +26,7 @@
#ifndef HTMLDocumentParser_h
#define HTMLDocumentParser_h
+#include <memory>
#include "core/CoreExport.h"
#include "core/dom/ParserContentPolicy.h"
#include "core/dom/ScriptableDocumentParser.h"
@@ -48,7 +49,6 @@
#include "wtf/RefPtr.h"
#include "wtf/WeakPtr.h"
#include "wtf/text/TextPosition.h"
-#include <memory>
namespace blink {
@@ -71,7 +71,6 @@ class DocumentWriteEvaluator;
class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser,
private HTMLParserScriptRunnerHost {
USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser);
- USING_PRE_FINALIZER(HTMLDocumentParser, dispose);
public:
static HTMLDocumentParser* create(
@@ -82,9 +81,6 @@ class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser,
~HTMLDocumentParser() override;
DECLARE_VIRTUAL_TRACE();
- // TODO(alexclarke): Remove when background parser goes away.
- void dispose();
-
// Exposed for HTMLParserScheduler
void resumeParsingAfterYield();
@@ -139,6 +135,10 @@ class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser,
void flush() final;
void setDecoder(std::unique_ptr<TextResourceDecoder>) final;
+ TokenizedChunkQueue* tokenizedChunkQueue() {
+ return m_tokenizedChunkQueue.get();
+ }
+
protected:
void insert(const SegmentedString&) final;
void append(const String&) override;
@@ -189,7 +189,6 @@ class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser,
void appendCurrentInputStreamToPreloadScannerAndScan() final;
void startBackgroundParser();
- void stopBackgroundParser();
void validateSpeculations(std::unique_ptr<TokenizedChunk> lastChunk);
void discardSpeculationsAndResumeFrom(
std::unique_ptr<TokenizedChunk> lastChunk,
@@ -247,7 +246,6 @@ class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser,
// A scanner used only for input provided to the insert() method.
std::unique_ptr<HTMLPreloadScanner> m_insertionPreloadScanner;
- RefPtr<WebTaskRunner> m_loadingTaskRunner;
Member<HTMLParserScheduler> m_parserScheduler;
HTMLSourceTracker m_sourceTracker;
TextPosition m_textPosition;
@@ -259,8 +257,7 @@ class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser,
// and passed between threads together.
std::unique_ptr<TokenizedChunk> m_lastChunkBeforePause;
Deque<std::unique_ptr<TokenizedChunk>> m_speculations;
- WeakPtrFactory<HTMLDocumentParser> m_weakFactory;
- WeakPtr<BackgroundHTMLParser> m_backgroundParser;
+ Member<BackgroundHTMLParser> m_backgroundParser;
Member<HTMLResourcePreloader> m_preloader;
PreloadRequestStream m_queuedPreloads;
Vector<String> m_queuedDocumentWriteScripts;
@@ -279,7 +276,6 @@ class CORE_EXPORT HTMLDocumentParser : public ScriptableDocumentParser,
bool m_shouldUseThreading;
bool m_endWasDelayed;
- bool m_haveBackgroundParser;
bool m_tasksWereSuspended;
unsigned m_pumpSessionNestingLevel;
unsigned m_pumpSpeculationsSessionNestingLevel;

Powered by Google App Engine
This is Rietveld 408576698