Unreviewed, rolling out r143797.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2013 07:27:04 +0000 (07:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2013 07:27:04 +0000 (07:27 +0000)
http://trac.webkit.org/changeset/143797
https://bugs.webkit.org/show_bug.cgi?id=110724

Causes assertion failures in multiple tests. (Requested by
vsevik on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-24

* dom/DocumentParser.h:
(DocumentParser):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
* html/parser/HTMLDocumentParser.h:
(HTMLDocumentParser):
(WebCore::HTMLDocumentParser::shouldUseThreading):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143886 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/DocumentParser.h
Source/WebCore/html/parser/HTMLDocumentParser.cpp
Source/WebCore/html/parser/HTMLDocumentParser.h
Source/WebCore/loader/DocumentWriter.cpp

index 6503601..098a2d1 100644 (file)
@@ -1,3 +1,22 @@
+2013-02-24  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r143797.
+        http://trac.webkit.org/changeset/143797
+        https://bugs.webkit.org/show_bug.cgi?id=110724
+
+        Causes assertion failures in multiple tests. (Requested by
+        vsevik on #webkit).
+
+        * dom/DocumentParser.h:
+        (DocumentParser):
+        * html/parser/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::HTMLDocumentParser):
+        * html/parser/HTMLDocumentParser.h:
+        (HTMLDocumentParser):
+        (WebCore::HTMLDocumentParser::shouldUseThreading):
+        * loader/DocumentWriter.cpp:
+        (WebCore::DocumentWriter::replaceDocument):
+
 2013-02-24  Hajime Morrita  <morrita@google.com>
 
         Rollout r143556, it regressed html5-full-render perf.
index aaf11b2..03df8bc 100644 (file)
@@ -49,8 +49,6 @@ public:
     virtual void appendBytes(DocumentWriter*, const char* bytes, size_t length) = 0;
     virtual void flush(DocumentWriter*) = 0;
 
-    virtual void pinToMainThread() { }
-
     // FIXME: append() should be private, but DocumentWriter::replaceDocument
     // uses it for now.
     virtual void append(const SegmentedString&) = 0;
index d257c3f..57e7b2d 100644 (file)
@@ -89,7 +89,6 @@ HTMLDocumentParser::HTMLDocumentParser(HTMLDocument* document, bool reportErrors
     , m_weakFactory(this)
 #endif
     , m_preloader(adoptPtr(new HTMLResourcePreloader(document)))
-    , m_isPinnedToMainThread(false)
     , m_endWasDelayed(false)
     , m_haveBackgroundParser(false)
     , m_pumpSessionNestingLevel(0)
@@ -109,7 +108,6 @@ HTMLDocumentParser::HTMLDocumentParser(DocumentFragment* fragment, Element* cont
 #if ENABLE(THREADED_HTML_PARSER)
     , m_weakFactory(this)
 #endif
-    , m_isPinnedToMainThread(true)
     , m_endWasDelayed(false)
     , m_haveBackgroundParser(false)
     , m_pumpSessionNestingLevel(0)
@@ -128,19 +126,6 @@ HTMLDocumentParser::~HTMLDocumentParser()
     ASSERT(!m_haveBackgroundParser);
 }
 
-#if ENABLE(THREADED_HTML_PARSER)
-void HTMLDocumentParser::pinToMainThread()
-{
-    ASSERT(!m_haveBackgroundParser);
-    ASSERT(!m_tokenizer);
-    ASSERT(!m_token);
-    ASSERT(!m_isPinnedToMainThread);
-    m_isPinnedToMainThread = true;
-    m_token = adoptPtr(new HTMLToken);
-    m_tokenizer = HTMLTokenizer::create(m_options);
-}
-#endif
-
 void HTMLDocumentParser::detach()
 {
 #if ENABLE(THREADED_HTML_PARSER)
index 1bbf771..e199ed4 100644 (file)
@@ -96,9 +96,9 @@ public:
 #endif
 
 protected:
-    virtual void insert(const SegmentedString&) OVERRIDE;
-    virtual void append(const SegmentedString&) OVERRIDE;
-    virtual void finish() OVERRIDE;
+    virtual void insert(const SegmentedString&);
+    virtual void append(const SegmentedString&);
+    virtual void finish();
 
     HTMLDocumentParser(HTMLDocument*, bool reportErrors);
     HTMLDocumentParser(DocumentFragment*, Element* contextElement, FragmentScriptingPermission);
@@ -114,24 +114,21 @@ private:
     }
 
     // DocumentParser
-#if ENABLE(THREADED_HTML_PARSER)
-    virtual void pinToMainThread() OVERRIDE;
-#endif
-    virtual void detach() OVERRIDE;
-    virtual bool hasInsertionPoint() OVERRIDE;
-    virtual bool processingData() const OVERRIDE;
-    virtual void prepareToStopParsing() OVERRIDE;
-    virtual void stopParsing() OVERRIDE;
-    virtual bool isWaitingForScripts() const OVERRIDE;
-    virtual bool isExecutingScript() const OVERRIDE;
-    virtual void executeScriptsWaitingForStylesheets() OVERRIDE;
+    virtual void detach();
+    virtual bool hasInsertionPoint();
+    virtual bool processingData() const;
+    virtual void prepareToStopParsing();
+    virtual void stopParsing();
+    virtual bool isWaitingForScripts() const;
+    virtual bool isExecutingScript() const;
+    virtual void executeScriptsWaitingForStylesheets();
 
     // HTMLScriptRunnerHost
-    virtual void watchForLoad(CachedResource*) OVERRIDE;
-    virtual void stopWatchingForLoad(CachedResource*) OVERRIDE;
+    virtual void watchForLoad(CachedResource*);
+    virtual void stopWatchingForLoad(CachedResource*);
     virtual HTMLInputStream& inputStream() { return m_input; }
     virtual bool hasPreloadScanner() const { return m_preloadScanner.get() && !shouldUseThreading(); }
-    virtual void appendCurrentInputStreamToPreloadScannerAndScan() OVERRIDE;
+    virtual void appendCurrentInputStreamToPreloadScannerAndScan();
 
     // CachedResourceClient
     virtual void notifyFinished(CachedResource*);
@@ -167,7 +164,7 @@ private:
     void attemptToRunDeferredScriptsAndEnd();
     void end();
 
-    bool shouldUseThreading() const { return m_options.useThreading && !m_isPinnedToMainThread; }
+    bool shouldUseThreading() const { return m_options.useThreading && !isParsingFragment(); }
 
     bool isParsingFragment() const;
     bool isScheduledForResume() const;
@@ -199,7 +196,6 @@ private:
 #endif
     OwnPtr<HTMLResourcePreloader> m_preloader;
 
-    bool m_isPinnedToMainThread;
     bool m_endWasDelayed;
     bool m_haveBackgroundParser;
     unsigned m_pumpSessionNestingLevel;
index ada519a..1a16eec 100644 (file)
@@ -78,10 +78,8 @@ void DocumentWriter::replaceDocument(const String& source, Document* ownerDocume
 
         // FIXME: This should call DocumentParser::appendBytes instead of append
         // to support RawDataDocumentParsers.
-        if (DocumentParser* parser = m_frame->document()->parser()) {
-            parser->pinToMainThread();
+        if (DocumentParser* parser = m_frame->document()->parser())
             parser->append(source);
-        }
     }
 
     end();