2010-08-23 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Aug 2010 04:20:29 +0000 (04:20 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Aug 2010 04:20:29 +0000 (04:20 +0000)
        Reviewed by Eric Seidel.

        HTMLScriptRunner::create
        https://bugs.webkit.org/show_bug.cgi?id=44474

        * html/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::HTMLDocumentParser):
        * html/HTMLScriptRunner.h:
        (WebCore::HTMLScriptRunner::create):

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

WebCore/ChangeLog
WebCore/html/HTMLDocumentParser.cpp
WebCore/html/HTMLScriptRunner.h

index 646f611..0f756f4 100644 (file)
@@ -2,6 +2,18 @@
 
         Reviewed by Eric Seidel.
 
+        HTMLScriptRunner::create
+        https://bugs.webkit.org/show_bug.cgi?id=44474
+
+        * html/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::HTMLDocumentParser):
+        * html/HTMLScriptRunner.h:
+        (WebCore::HTMLScriptRunner::create):
+
+2010-08-23  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
         HTMLTreeBuilder should use adoptPtr
         https://bugs.webkit.org/show_bug.cgi?id=44473
 
index c6f8dea..95c4fe1 100644 (file)
@@ -96,7 +96,7 @@ HTMLTokenizer::State tokenizerStateForContextElement(Element* contextElement, bo
 HTMLDocumentParser::HTMLDocumentParser(HTMLDocument* document, bool reportErrors)
     : ScriptableDocumentParser(document)
     , m_tokenizer(new HTMLTokenizer)
-    , m_scriptRunner(new HTMLScriptRunner(document, this))
+    , m_scriptRunner(HTMLScriptRunner::create(document, this))
     , m_treeBuilder(HTMLTreeBuilder::create(m_tokenizer.get(), document, reportErrors))
     , m_parserScheduler(new HTMLParserScheduler(this))
     , m_endWasDelayed(false)
index 262f1a2..ead9289 100644 (file)
@@ -42,7 +42,10 @@ class ScriptSourceCode;
 
 class HTMLScriptRunner : public Noncopyable {
 public:
-    HTMLScriptRunner(Document*, HTMLScriptRunnerHost*);
+    static PassOwnPtr<HTMLScriptRunner> create(Document* document, HTMLScriptRunnerHost* host)
+    {
+        return adoptPtr(new HTMLScriptRunner(document, host));
+    }
     ~HTMLScriptRunner();
 
     void detach();
@@ -57,6 +60,8 @@ public:
     bool isExecutingScript() const { return !!m_scriptNestingLevel; }
 
 private:
+    HTMLScriptRunner(Document*, HTMLScriptRunnerHost*);
+
     Frame* frame() const;
 
     void executeParsingBlockingScript();