2011-01-04 Sheriff Bot <webkit.review.bot@gmail.com>
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jan 2011 07:21:33 +0000 (07:21 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jan 2011 07:21:33 +0000 (07:21 +0000)
        Unreviewed, rolling out r74992.
        http://trac.webkit.org/changeset/74992
        https://bugs.webkit.org/show_bug.cgi?id=51917

        Crash in HTMLDocumentParser::suspendScheduledTasks()
        (Requested by tkent on #webkit).

        * dom/DocumentParser.cpp:
        * dom/DocumentParser.h:
        * html/parser/HTMLDocumentParser.cpp:
        * html/parser/HTMLDocumentParser.h:
        * html/parser/HTMLParserScheduler.cpp:
        (WebCore::HTMLParserScheduler::HTMLParserScheduler):
        * html/parser/HTMLParserScheduler.h:
        (WebCore::HTMLParserScheduler::isScheduledForResume):
        * page/PageGroupLoadDeferrer.cpp:
        (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
        (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):

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

WebCore/ChangeLog
WebCore/dom/DocumentParser.cpp
WebCore/dom/DocumentParser.h
WebCore/html/parser/HTMLDocumentParser.cpp
WebCore/html/parser/HTMLDocumentParser.h
WebCore/html/parser/HTMLParserScheduler.cpp
WebCore/html/parser/HTMLParserScheduler.h
WebCore/page/PageGroupLoadDeferrer.cpp

index 48a928c..6412cc5 100644 (file)
@@ -1,3 +1,24 @@
+2011-01-04  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r74992.
+        http://trac.webkit.org/changeset/74992
+        https://bugs.webkit.org/show_bug.cgi?id=51917
+
+        Crash in HTMLDocumentParser::suspendScheduledTasks()
+        (Requested by tkent on #webkit).
+
+        * dom/DocumentParser.cpp:
+        * dom/DocumentParser.h:
+        * html/parser/HTMLDocumentParser.cpp:
+        * html/parser/HTMLDocumentParser.h:
+        * html/parser/HTMLParserScheduler.cpp:
+        (WebCore::HTMLParserScheduler::HTMLParserScheduler):
+        * html/parser/HTMLParserScheduler.h:
+        (WebCore::HTMLParserScheduler::isScheduledForResume):
+        * page/PageGroupLoadDeferrer.cpp:
+        (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
+        (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
+
 2011-01-04  Benjamin Poulain  <benjamin.poulain@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
index 355b1cf..5f8e04f 100644 (file)
@@ -68,13 +68,5 @@ void DocumentParser::detach()
     m_document = 0;
 }
 
-void DocumentParser::suspendScheduledTasks()
-{
-}
-
-void DocumentParser::resumeScheduledTasks()
-{
-}
-
 };
 
index 6f78a38..aa18a64 100644 (file)
@@ -91,10 +91,6 @@ public:
     void setDocumentWasLoadedAsPartOfNavigation() { m_documentWasLoadedAsPartOfNavigation = true; }
     bool documentWasLoadedAsPartOfNavigation() const { return m_documentWasLoadedAsPartOfNavigation; }
 
-    // FIXME: The names are not very accurate :(
-    virtual void suspendScheduledTasks();
-    virtual void resumeScheduledTasks();
-
 protected:
     DocumentParser(Document*);
 
index cfdc126..0e3a10b 100644 (file)
@@ -520,14 +520,4 @@ bool HTMLDocumentParser::usePreHTML5ParserQuirks(Document* document)
     return document->settings() && document->settings()->usePreHTML5ParserQuirks();
 }
 
-void HTMLDocumentParser::suspendScheduledTasks()
-{
-    m_parserScheduler->suspend();
-}
-
-void HTMLDocumentParser::resumeScheduledTasks()
-{
-    m_parserScheduler->resume();
-}
-
 }
index 80ca727..fca269a 100644 (file)
@@ -72,8 +72,6 @@ public:
     HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); }
 
     virtual TextPosition0 textPosition() const;
-    virtual void suspendScheduledTasks();
-    virtual void resumeScheduledTasks();
 
 protected:
     virtual void insert(const SegmentedString&);
index 56db1aa..6e67697 100644 (file)
@@ -65,7 +65,6 @@ HTMLParserScheduler::HTMLParserScheduler(HTMLDocumentParser* parser)
     , m_parserTimeLimit(parserTimeLimit(m_parser->document()->page()))
     , m_parserChunkSize(parserChunkSize(m_parser->document()->page()))
     , m_continueNextChunkTimer(this, &HTMLParserScheduler::continueNextChunkTimerFired)
-    , m_isSuspendedWithActiveTimer(false)
 {
 }
 
@@ -93,22 +92,4 @@ void HTMLParserScheduler::continueNextChunkTimerFired(Timer<HTMLParserScheduler>
     m_parser->resumeParsingAfterYield();
 }
 
-void HTMLParserScheduler::suspend()
-{
-    ASSERT(!m_isSuspendedWithActiveTimer);
-    if (!m_continueNextChunkTimer.isActive())
-        return;
-    m_isSuspendedWithActiveTimer = true;
-    m_continueNextChunkTimer.stop();
-}
-
-void HTMLParserScheduler::resume()
-{
-    ASSERT(!m_continueNextChunkTimer.isActive());
-    if (!m_isSuspendedWithActiveTimer)
-        return;
-    m_isSuspendedWithActiveTimer = false;
-    m_continueNextChunkTimer.startOneShot(0);
-}
-
 }
index 3a20b2b..5be33b0 100644 (file)
@@ -71,10 +71,7 @@ public:
         return true;
     }
 
-    bool isScheduledForResume() const { return m_isSuspendedWithActiveTimer || m_continueNextChunkTimer.isActive(); }
-
-    void suspend();
-    void resume();
+    bool isScheduledForResume() const { return m_continueNextChunkTimer.isActive(); }
 
 private:
     HTMLParserScheduler(HTMLDocumentParser*);
@@ -86,7 +83,6 @@ private:
     double m_parserTimeLimit;
     int m_parserChunkSize;
     Timer<HTMLParserScheduler> m_continueNextChunkTimer;
-    bool m_isSuspendedWithActiveTimer;
 };
 
 }
index 781bc34..98a4720 100644 (file)
@@ -22,7 +22,6 @@
 #include "PageGroupLoadDeferrer.h"
 
 #include "AsyncScriptRunner.h"
-#include "DocumentParser.h"
 #include "Frame.h"
 #include "Page.h"
 #include "PageGroup.h"
@@ -50,8 +49,6 @@ PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf)
                 for (Frame* frame = otherPage->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
                     frame->document()->suspendActiveDOMObjects(ActiveDOMObject::WillShowDialog);
                     frame->document()->asyncScriptRunner()->suspend();
-                    if (DocumentParser* parser = frame->document()->parser())
-                        parser->suspendScheduledTasks();
                 }
             }
         }
@@ -72,8 +69,6 @@ PageGroupLoadDeferrer::~PageGroupLoadDeferrer()
             for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
                 frame->document()->resumeActiveDOMObjects();
                 frame->document()->asyncScriptRunner()->resume();
-                if (DocumentParser* parser = frame->document()->parser())
-                    parser->resumeScheduledTasks();
             }
         }
     }