[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tonyg at chromium.org tonyg at chromium.org
Wed Dec 22 11:46:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f77f9365027a098f6eb932aa861a0a2a8e992b51
Author: tonyg at chromium.org <tonyg at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 6 17:35:57 2010 +0000

    2010-08-06  Tony Gentilcore  <tonyg at chromium.org>
    
            Reviewed by Adam Barth.
    
            Factor out PendingScript and protect its members
            https://bugs.webkit.org/show_bug.cgi?id=43391
    
            This will be shared by AsyncScriptRunner.
    
            No new tests because no new functionality.
    
            * Android.mk:
            * CMakeLists.txt:
            * GNUmakefile.am:
            * WebCore.gypi:
            * WebCore.pro:
            * WebCore.vcproj/WebCore.vcproj:
            * WebCore.xcodeproj/project.pbxproj:
            * dom/PendingScript.cpp: Added.
            (WebCore::PendingScript::~PendingScript):
            (WebCore::PendingScript::element):
            (WebCore::PendingScript::releaseElementAndClear):
            (WebCore::PendingScript::setCachedScript):
            (WebCore::PendingScript::cachedScript):
            * dom/PendingScript.h: Added.
            (WebCore::PendingScript::PendingScript):
            (WebCore::PendingScript::startingLineNumber):
            (WebCore::PendingScript::watchingForLoad):
            (WebCore::PendingScript::setWatchingForLoad):
            (WebCore::PendingScript::hasElement):
            (WebCore::PendingScript::adoptElement):
            (WebCore::PendingScript::notifyFinished):
            * html/HTMLScriptRunner.cpp:
            (WebCore::HTMLScriptRunner::sourceFromPendingScript):
            (WebCore::HTMLScriptRunner::haveParsingBlockingScript):
            (WebCore::HTMLScriptRunner::requestScript):
            * html/HTMLScriptRunner.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64857 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 83f82ed..d7c7029 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -158,6 +158,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	dom/DeviceOrientationEvent.cpp \
 	dom/OverflowEvent.cpp \
 	dom/PageTransitionEvent.cpp \
+	dom/PendingScript.cpp \
 	dom/Position.cpp \
 	dom/PositionIterator.cpp \
 	dom/ProcessingInstruction.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 1a93b0b..04161bc 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -837,6 +837,7 @@ SET(WebCore_SOURCES
     dom/OptionGroupElement.cpp
     dom/OverflowEvent.cpp
     dom/PageTransitionEvent.cpp
+    dom/PendingScript.cpp
     dom/PopStateEvent.cpp
     dom/Position.cpp
     dom/PositionIterator.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c70373d..404a9e4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,41 @@
+2010-08-06  Tony Gentilcore  <tonyg at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Factor out PendingScript and protect its members
+        https://bugs.webkit.org/show_bug.cgi?id=43391
+
+        This will be shared by AsyncScriptRunner.
+
+        No new tests because no new functionality.
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/PendingScript.cpp: Added.
+        (WebCore::PendingScript::~PendingScript):
+        (WebCore::PendingScript::element):
+        (WebCore::PendingScript::releaseElementAndClear):
+        (WebCore::PendingScript::setCachedScript):
+        (WebCore::PendingScript::cachedScript):
+        * dom/PendingScript.h: Added.
+        (WebCore::PendingScript::PendingScript):
+        (WebCore::PendingScript::startingLineNumber):
+        (WebCore::PendingScript::watchingForLoad):
+        (WebCore::PendingScript::setWatchingForLoad):
+        (WebCore::PendingScript::hasElement):
+        (WebCore::PendingScript::adoptElement):
+        (WebCore::PendingScript::notifyFinished):
+        * html/HTMLScriptRunner.cpp:
+        (WebCore::HTMLScriptRunner::sourceFromPendingScript):
+        (WebCore::HTMLScriptRunner::haveParsingBlockingScript):
+        (WebCore::HTMLScriptRunner::requestScript):
+        * html/HTMLScriptRunner.h:
+
 2010-08-06  Gyuyoung Kim  <gyuyoung.kim at samsung.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 8406170..4ae59ac 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1115,6 +1115,8 @@ webcore_sources += \
 	WebCore/dom/OverflowEvent.h \
 	WebCore/dom/PageTransitionEvent.cpp \
 	WebCore/dom/PageTransitionEvent.h \
+	WebCore/dom/PendingScript.cpp \
+	WebCore/dom/PendingScript.h \
 	WebCore/dom/Position.cpp \
 	WebCore/dom/Position.h \
 	WebCore/dom/PopStateEvent.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index c1e59fe..9684c62 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1224,6 +1224,8 @@
             'dom/PopStateEvent.h',
             'dom/PageTransitionEvent.cpp',
             'dom/PageTransitionEvent.h',
+            'dom/PendingScript.cpp',
+            'dom/PendingScript.h',
             'dom/Position.cpp',
             'dom/Position.h',
             'dom/PositionIterator.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 967e330..7addfa1 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -525,6 +525,7 @@ SOURCES += \
     dom/StaticHashSetNodeList.cpp \
     dom/OverflowEvent.cpp \
     dom/PageTransitionEvent.cpp \
+    dom/PendingScript.cpp \
     dom/PopStateEvent.cpp \
     dom/Position.cpp \
     dom/PositionIterator.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 18a8d92..bb9a2c9 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -33081,6 +33081,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\dom\PendingScript.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\dom\PendingScript.h"
+				>
+			</File>
+			<File
 				RelativePath="..\dom\PageTransitionEvent.cpp"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index fa2c51f..437f713 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -2356,6 +2356,8 @@
 		89CD029311C85B870070B791 /* JSBlobBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89CD029111C85B870070B791 /* JSBlobBuilder.cpp */; };
 		89CD029411C85B870070B791 /* JSBlobBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 89CD029211C85B870070B791 /* JSBlobBuilder.h */; };
 		8A12E35D11FA33280025836A /* DocumentLoadTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A12E35C11FA33280025836A /* DocumentLoadTiming.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		8A7CC96B12076D73001D4588 /* PendingScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A7CC96A12076D73001D4588 /* PendingScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		8A7CC97012076F8A001D4588 /* PendingScript.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A7CC96F12076F8A001D4588 /* PendingScript.cpp */; };
 		8A81BF8511DCFD9000DA2B98 /* ResourceLoadTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A81BF8411DCFD9000DA2B98 /* ResourceLoadTiming.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		8A844D0411D3C18E0014065C /* Performance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A844D0111D3C18E0014065C /* Performance.cpp */; };
 		8A844D0511D3C18E0014065C /* Performance.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A844D0211D3C18E0014065C /* Performance.h */; };
@@ -8157,6 +8159,8 @@
 		89CD029111C85B870070B791 /* JSBlobBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBlobBuilder.cpp; sourceTree = "<group>"; };
 		89CD029211C85B870070B791 /* JSBlobBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBlobBuilder.h; sourceTree = "<group>"; };
 		8A12E35C11FA33280025836A /* DocumentLoadTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentLoadTiming.h; sourceTree = "<group>"; };
+		8A7CC96A12076D73001D4588 /* PendingScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PendingScript.h; sourceTree = "<group>"; };
+		8A7CC96F12076F8A001D4588 /* PendingScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PendingScript.cpp; sourceTree = "<group>"; };
 		8A81BF8411DCFD9000DA2B98 /* ResourceLoadTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadTiming.h; sourceTree = "<group>"; };
 		8A844D0111D3C18E0014065C /* Performance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Performance.cpp; sourceTree = "<group>"; };
 		8A844D0211D3C18E0014065C /* Performance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Performance.h; sourceTree = "<group>"; };
@@ -17266,6 +17270,8 @@
 				E1284AE910447DEE00EAEB52 /* PageTransitionEvent.cpp */,
 				E1284AE010447D4500EAEB52 /* PageTransitionEvent.h */,
 				E1284AD910447AEB00EAEB52 /* PageTransitionEvent.idl */,
+				8A7CC96F12076F8A001D4588 /* PendingScript.cpp */,
+				8A7CC96A12076D73001D4588 /* PendingScript.h */,
 				41BF700D0FE86F61005E8DEC /* PlatformMessagePortChannel.cpp */,
 				41BF700E0FE86F61005E8DEC /* PlatformMessagePortChannel.h */,
 				5189F0DD10B46B0E00F3C739 /* PopStateEvent.cpp */,
@@ -20075,6 +20081,7 @@
 				31FB1A5B120A5D0600DC02A0 /* DeviceMotionData.h in Headers */,
 				31FB1A5D120A5D0600DC02A0 /* DeviceMotionEvent.h in Headers */,
 				31FB1A66120A5D3F00DC02A0 /* JSDeviceMotionEvent.h in Headers */,
+				8A7CC96B12076D73001D4588 /* PendingScript.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -22490,6 +22497,7 @@
 				31FB1A5C120A5D0600DC02A0 /* DeviceMotionEvent.cpp in Sources */,
 				31FB1A65120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp in Sources */,
 				31FB1A6C120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp in Sources */,
+				8A7CC97012076F8A001D4588 /* PendingScript.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/dom/PendingScript.cpp b/WebCore/dom/PendingScript.cpp
new file mode 100644
index 0000000..42e225a
--- /dev/null
+++ b/WebCore/dom/PendingScript.cpp
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 Google, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "PendingScript.h"
+
+#include "CachedScript.h"
+#include "Element.h"
+
+namespace WebCore {
+
+PendingScript::~PendingScript()
+{
+    if (m_cachedScript)
+        m_cachedScript->removeClient(this);
+}
+
+PassRefPtr<Element> PendingScript::releaseElementAndClear()
+{
+    setCachedScript(0);
+    m_startingLineNumber = 0;
+    m_watchingForLoad = false;
+    return m_element.release();
+}
+
+void PendingScript::setCachedScript(CachedScript* cachedScript)
+{
+    if (m_cachedScript == cachedScript)
+        return;
+    if (m_cachedScript)
+        m_cachedScript->removeClient(this);
+    m_cachedScript = cachedScript;
+    if (m_cachedScript)
+        m_cachedScript->addClient(this);
+}
+
+CachedScript* PendingScript::cachedScript() const
+{
+    return m_cachedScript.get();
+}
+
+void PendingScript::notifyFinished(CachedResource*)
+{
+}
+
+}
diff --git a/WebCore/dom/PendingScript.h b/WebCore/dom/PendingScript.h
new file mode 100644
index 0000000..805f7ff
--- /dev/null
+++ b/WebCore/dom/PendingScript.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2010 Google, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef PendingScript_h
+#define PendingScript_h
+
+#include "CachedResourceClient.h"
+#include "CachedResourceHandle.h"
+#include <wtf/Noncopyable.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class CachedScript;
+class Element;
+
+// A container for an external script which may be loaded and executed.
+//
+// A CachedResourceHandle alone does not prevent the underlying CachedResource
+// from purging its data buffer. This class holds a dummy client open for its
+// lifetime in order to guarantee that the data buffer will not be purged.
+class PendingScript : public Noncopyable, CachedResourceClient {
+public:
+    PendingScript()
+        : m_startingLineNumber(0)
+        , m_watchingForLoad(false)
+    {
+    }
+
+    ~PendingScript();
+
+    // FIXME: No setter means this is never set to anything other than 0.
+    // This is either unnecessary or incorrect.
+    int startingLineNumber() const { return m_startingLineNumber; }
+
+    bool watchingForLoad() const { return m_watchingForLoad; }
+    void setWatchingForLoad(bool b) { m_watchingForLoad = b; }
+
+    Element* element() const { return m_element.get(); }
+    void adoptElement(Element* element) { m_element = element; }
+    PassRefPtr<Element> releaseElementAndClear();
+
+    CachedScript* cachedScript() const;
+    void setCachedScript(CachedScript*);
+
+    virtual void notifyFinished(CachedResource*);
+
+private:
+    int m_startingLineNumber; // Only used for inline script tags.
+    bool m_watchingForLoad;
+    RefPtr<Element> m_element;
+    CachedResourceHandle<CachedScript> m_cachedScript;
+};
+
+}
+
+#endif
diff --git a/WebCore/html/HTMLScriptRunner.cpp b/WebCore/html/HTMLScriptRunner.cpp
index f4b7013..4a9058f 100644
--- a/WebCore/html/HTMLScriptRunner.cpp
+++ b/WebCore/html/HTMLScriptRunner.cpp
@@ -105,7 +105,7 @@ ScriptSourceCode HTMLScriptRunner::sourceFromPendingScript(const PendingScript&
         return ScriptSourceCode(script.cachedScript());
     }
     errorOccurred = false;
-    return ScriptSourceCode(script.element->textContent(), documentURLForScriptExecution(m_document), script.startingLineNumber);
+    return ScriptSourceCode(script.element()->textContent(), documentURLForScriptExecution(m_document), script.startingLineNumber());
 }
 
 bool HTMLScriptRunner::isPendingScriptReady(const PendingScript& script)
@@ -195,7 +195,7 @@ bool HTMLScriptRunner::execute(PassRefPtr<Element> scriptElement, int startLine)
 
 bool HTMLScriptRunner::haveParsingBlockingScript() const
 {
-    return !!m_parsingBlockingScript.element;
+    return !!m_parsingBlockingScript.element();
 }
 
 bool HTMLScriptRunner::executeParsingBlockingScripts()
@@ -230,7 +230,7 @@ bool HTMLScriptRunner::executeScriptsWaitingForStylesheets()
 
 void HTMLScriptRunner::requestScript(Element* script)
 {
-    ASSERT(!m_parsingBlockingScript.element);
+    ASSERT(!m_parsingBlockingScript.element());
     AtomicString srcValue = script->getAttribute(srcAttr);
     // Allow the host to disllow script loads (using the XSSAuditor, etc.)
     if (!m_host->shouldLoadExternalScriptFromSrc(srcValue))
@@ -238,7 +238,7 @@ void HTMLScriptRunner::requestScript(Element* script)
     // FIXME: We need to resolve the url relative to the element.
     if (!script->dispatchBeforeLoadEvent(srcValue))
         return;
-    m_parsingBlockingScript.element = script;
+    m_parsingBlockingScript.adoptElement(script);
     // This should correctly return 0 for empty or invalid srcValues.
     CachedScript* cachedScript = m_document->docLoader()->requestScript(srcValue, toScriptElement(script)->scriptCharset());
     if (!cachedScript) {
@@ -278,34 +278,4 @@ void HTMLScriptRunner::runScript(Element* script, int startingLineNumber)
     }
 }
 
-HTMLScriptRunner::PendingScript::~PendingScript()
-{
-    if (m_cachedScript)
-        m_cachedScript->removeClient(this);
-}
-
-PassRefPtr<Element> HTMLScriptRunner::PendingScript::releaseElementAndClear()
-{
-    setCachedScript(0);
-    startingLineNumber = 0;
-    m_watchingForLoad = false;
-    return element.release();
-}
-
-void HTMLScriptRunner::PendingScript::setCachedScript(CachedScript* cachedScript)
-{
-    if (m_cachedScript == cachedScript)
-        return;
-    if (m_cachedScript)
-        m_cachedScript->removeClient(this);
-    m_cachedScript = cachedScript;
-    if (m_cachedScript)
-        m_cachedScript->addClient(this);
-}
-
-CachedScript* HTMLScriptRunner::PendingScript::cachedScript() const
-{
-    return m_cachedScript.get();
-}
-
 }
diff --git a/WebCore/html/HTMLScriptRunner.h b/WebCore/html/HTMLScriptRunner.h
index cc69443..85801b2 100644
--- a/WebCore/html/HTMLScriptRunner.h
+++ b/WebCore/html/HTMLScriptRunner.h
@@ -26,14 +26,13 @@
 #ifndef HTMLScriptRunner_h
 #define HTMLScriptRunner_h
 
-#include "CachedResourceClient.h"
-#include "CachedResourceHandle.h"
+#include "PendingScript.h"
 #include <wtf/Noncopyable.h>
 #include <wtf/PassRefPtr.h>
 
 namespace WebCore {
 
-class CachedResourceClient;
+class CachedResource;
 class CachedScript;
 class Document;
 class Element;
@@ -56,45 +55,6 @@ public:
     bool isExecutingScript() { return !!m_scriptNestingLevel; }
 
 private:
-    // A container for an external script which may be loaded and executed.
-    //
-    // A CachedResourceHandle alone does not prevent the underlying CachedResource
-    // from purging its data buffer. This class holds a dummy client open for its
-    // lifetime in order to guarantee that the data buffer will not be purged.
-    //
-    // FIXME: Finish turning this into a proper class.
-    class PendingScript : public CachedResourceClient, Noncopyable {
-    public:
-        PendingScript()
-            : startingLineNumber(0)
-            , m_watchingForLoad(false)
-        {
-        }
-
-        ~PendingScript();
-
-        PassRefPtr<Element> releaseElementAndClear();
-
-        bool watchingForLoad() const { return m_watchingForLoad; }
-        void setWatchingForLoad(bool b) { m_watchingForLoad = b; }
-
-        CachedScript* cachedScript() const;
-        void setCachedScript(CachedScript*);
-
-        virtual void notifyFinished(CachedResource*)
-        {
-        }
-
-        RefPtr<Element> element;
-        int startingLineNumber; // Only used for inline script tags.
-        // HTML5 has an isReady parameter, however isReady ends up equivalent to
-        // m_document->haveStylesheetsLoaded() && cachedScript->isLoaded()
-
-    private:
-        bool m_watchingForLoad;
-        CachedResourceHandle<CachedScript> m_cachedScript;
-    };
-
     Frame* frame() const;
 
     bool haveParsingBlockingScript() const;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list