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

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

Issue 1366883002: [Reland] Post loading tasks on the appropriate WebFrameScheduler's queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UAF in BackgroundHTMLParser Created 5 years, 2 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/HTMLParserScheduler.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.h b/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.h
index d7878dbc63a9d7bbc8bfbb726cc18ba84eb28006..ad3ccaac5d88150239b82fee62a35e8e4b1e702e 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.h
@@ -36,6 +36,7 @@ namespace blink {
class Document;
class HTMLDocumentParser;
+class WebTaskRunner;
class ActiveParserSession : public NestingLevelIncrementer {
STACK_ALLOCATED();
@@ -72,9 +73,9 @@ private:
class HTMLParserScheduler {
WTF_MAKE_NONCOPYABLE(HTMLParserScheduler); WTF_MAKE_FAST_ALLOCATED(HTMLParserScheduler);
public:
- static PassOwnPtr<HTMLParserScheduler> create(HTMLDocumentParser* parser)
+ static PassOwnPtr<HTMLParserScheduler> create(HTMLDocumentParser* parser, WebTaskRunner* loadingTaskRunner)
{
- return adoptPtr(new HTMLParserScheduler(parser));
+ return adoptPtr(new HTMLParserScheduler(parser, loadingTaskRunner));
}
~HTMLParserScheduler();
@@ -98,13 +99,13 @@ public:
void detach(); // Clear active tasks if any.
private:
- explicit HTMLParserScheduler(HTMLDocumentParser*);
+ HTMLParserScheduler(HTMLDocumentParser*, WebTaskRunner*);
bool shouldYield(const SpeculationsPumpSession&, bool startingScript) const;
void continueParsing();
HTMLDocumentParser* m_parser;
- WebTaskRunner* m_loadingTaskRunner; // NOT OWNED
+ OwnPtr<WebTaskRunner> m_loadingTaskRunner;
OwnPtr<CancellableTaskFactory> m_cancellableContinueParse;
bool m_isSuspendedWithActiveTimer;

Powered by Google App Engine
This is Rietveld 408576698