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

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

Issue 2371663002: Introduce an injection point to configure the internal pointer of WeakPtr
Patch Set: fix Created 4 years, 3 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/BackgroundHTMLParser.h
diff --git a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h
index 37583acce7df0f280c95f2abb55d7c1ed45c8cad..4f602dd3d3cfa4dda9d24c8aca149383c6e3f42b 100644
--- a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h
+++ b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h
@@ -54,7 +54,7 @@ public:
public:
Configuration();
HTMLParserOptions options;
- WeakPtr<HTMLDocumentParser> parser;
+ RevocableCrossThreadWeakPersistent<HTMLDocumentParser> parser;
std::unique_ptr<XSSAuditor> xssAuditor;
std::unique_ptr<TextResourceDecoder> decoder;
RefPtr<TokenizedChunkQueue> tokenizedChunkQueue;
@@ -74,7 +74,7 @@ public:
struct Checkpoint {
USING_FAST_MALLOC(Checkpoint);
public:
- WeakPtr<HTMLDocumentParser> parser;
+ RevocableCrossThreadWeakPersistent<HTMLDocumentParser> parser;
std::unique_ptr<HTMLToken> token;
std::unique_ptr<HTMLTokenizer> tokenizer;
HTMLTreeBuilderSimulator::State treeBuilderState;
@@ -118,7 +118,7 @@ private:
HTMLTreeBuilderSimulator m_treeBuilderSimulator;
HTMLParserOptions m_options;
const size_t m_outstandingTokenLimit;
- WeakPtr<HTMLDocumentParser> m_parser;
+ RevocableCrossThreadWeakPersistent<HTMLDocumentParser> m_parser;
std::unique_ptr<CompactHTMLTokenStream> m_pendingTokens;
const size_t m_pendingTokenLimit;

Powered by Google App Engine
This is Rietveld 408576698