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

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

Issue 1175183006: Make it possible to modify background HTML parser token limits. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make parser Settings values unsigned. Assert outstanding>=pending. Created 5 years, 6 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
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/BackgroundHTMLParser.h
diff --git a/Source/core/html/parser/BackgroundHTMLParser.h b/Source/core/html/parser/BackgroundHTMLParser.h
index d283adfc215fb4f3e4b9d15a9cd1b7461c6a519b..ebc1f9cce947441268ec97b55c6bfaaf1289e513 100644
--- a/Source/core/html/parser/BackgroundHTMLParser.h
+++ b/Source/core/html/parser/BackgroundHTMLParser.h
@@ -48,11 +48,16 @@ class BackgroundHTMLParser {
WTF_MAKE_FAST_ALLOCATED(BackgroundHTMLParser);
public:
struct Configuration {
+ Configuration();
HTMLParserOptions options;
WeakPtr<HTMLDocumentParser> parser;
OwnPtr<XSSAuditor> xssAuditor;
OwnPtr<TokenPreloadScanner> preloadScanner;
OwnPtr<TextResourceDecoder> decoder;
+ // outstandingTokenLimit must be greater than or equal to
+ // pendingTokenLimit
+ size_t outstandingTokenLimit;
+ size_t pendingTokenLimit;
};
static void start(PassRefPtr<WeakReference<BackgroundHTMLParser>>, PassOwnPtr<Configuration>, WebScheduler*);
@@ -96,9 +101,11 @@ private:
OwnPtr<HTMLTokenizer> m_tokenizer;
HTMLTreeBuilderSimulator m_treeBuilderSimulator;
HTMLParserOptions m_options;
+ const size_t m_outstandingTokenLimit;
WeakPtr<HTMLDocumentParser> m_parser;
OwnPtr<CompactHTMLTokenStream> m_pendingTokens;
+ const size_t m_pendingTokenLimit;
PreloadRequestStream m_pendingPreloads;
XSSInfoStream m_pendingXSSInfos;
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698