Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / Init.cpp
index 4af3b4c..b48d1f6 100644 (file)
@@ -44,6 +44,7 @@
 #include "XMLNSNames.h"
 #include "XMLNames.h"
 #include "core/css/MediaFeatureNames.h"
+#include "core/html/parser/HTMLParserThread.h"
 #include "heap/Heap.h"
 #include "platform/EventTracer.h"
 #include "platform/Partitions.h"
@@ -85,10 +86,16 @@ void init()
     PlatformThreadData::current();
 
     StringImpl::freezeStaticStrings();
+
+    // Creates HTMLParserThread::shared, but does not start the thread.
+    HTMLParserThread::init();
 }
 
 void shutdown()
 {
+    // Make sure we stop the HTMLParserThread before Platform::current() is cleared.
+    HTMLParserThread::shutdown();
+
     Partitions::shutdown();
 }