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

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

Issue 2209283002: Fix HTMLDocumentParser::stopBackgroundParser crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
index 07f747367118d5231744ac8252c9c26bf526b0f6..ed5d3592f20c47ae3ecd43aa377039fe2f1c5f45 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -129,10 +129,15 @@ HTMLDocumentParser::HTMLDocumentParser(Document& document, ParserContentPolicy c
, m_triedLoadingLinkHeaders(false)
{
ASSERT(shouldUseThreading() || (m_token && m_tokenizer));
+ ThreadState::current()->registerPreFinalizer(this);
}
HTMLDocumentParser::~HTMLDocumentParser()
{
+}
+
+void HTMLDocumentParser::dispose()
+{
// In Oilpan, HTMLDocumentParser can die together with Document, and
// detach() is not called in this case.
if (m_haveBackgroundParser)
@@ -721,6 +726,7 @@ void HTMLDocumentParser::startBackgroundParser()
ASSERT(document());
m_haveBackgroundParser = true;
+ // TODO(alexclarke): Remove WebFrameScheduler::setDocumentParsingInBackground when background parser goes away.
if (document()->frame() && document()->frame()->frameScheduler())
document()->frame()->frameScheduler()->setDocumentParsingInBackground(true);
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698