Stop the background-parser during HTMLDocumentParser::detatch to prevent crashes...
[WebKit-https.git] / Source / WebCore / html / parser / HTMLDocumentParser.cpp
index 46159f0..cee5521 100644 (file)
@@ -121,6 +121,10 @@ HTMLDocumentParser::~HTMLDocumentParser()
 
 void HTMLDocumentParser::detach()
 {
+#if ENABLE(THREADED_HTML_PARSER)
+    if (m_haveBackgroundParser)
+        stopBackgroundParser();
+#endif
     DocumentParser::detach();
     if (m_scriptRunner)
         m_scriptRunner->detach();