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

barraclough at apple.com barraclough at apple.com
Wed Dec 22 14:36:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b0e5a6cf492f96d82090fde037ab409b18a59f5a
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 13 23:34:49 2010 +0000

    Bug 47621 - Remove bindings/v8/ScriptString
    This is now redundant.
    
    Reviewed by Oliver Hunt.
    
    * bindings/v8/ScriptCallFrame.h:
    (WebCore::ScriptCallFrame::functionName):
    * bindings/v8/ScriptFunctionCall.cpp:
    * bindings/v8/ScriptFunctionCall.h:
    * bindings/v8/ScriptString.h: Removed.
    * bindings/v8/ScriptStringImpl.cpp: Removed.
    * bindings/v8/ScriptStringImpl.h: Removed.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69712 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2912f18..e9dac25 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-13  Gavin Barraclough  <barraclough at apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        Bug 47621 - Remove bindings/v8/ScriptString
+        This is now redundant.
+
+        * bindings/v8/ScriptCallFrame.h:
+        (WebCore::ScriptCallFrame::functionName):
+        * bindings/v8/ScriptFunctionCall.cpp:
+        * bindings/v8/ScriptFunctionCall.h:
+        * bindings/v8/ScriptString.h: Removed.
+        * bindings/v8/ScriptStringImpl.cpp: Removed.
+        * bindings/v8/ScriptStringImpl.h: Removed.
+
 2010-10-13  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by John Sullivan.
diff --git a/WebCore/bindings/v8/ScriptCallFrame.h b/WebCore/bindings/v8/ScriptCallFrame.h
index 935deb5..ff77d4a 100644
--- a/WebCore/bindings/v8/ScriptCallFrame.h
+++ b/WebCore/bindings/v8/ScriptCallFrame.h
@@ -32,7 +32,6 @@
 #define ScriptCallFrame_h
 
 #include "KURL.h"
-#include "ScriptString.h"
 
 #include <wtf/Vector.h>
 
@@ -53,7 +52,7 @@ namespace WebCore {
         ScriptCallFrame(const String& functionName, const String& urlString, int lineNumber);
         ~ScriptCallFrame();
 
-        const ScriptString& functionName() const { return m_functionName; }
+        const String& functionName() const { return m_functionName; }
         const String& sourceURL() const { return m_sourceURL; }
         unsigned lineNumber() const { return m_lineNumber; }
 
@@ -62,7 +61,7 @@ namespace WebCore {
         unsigned argumentCount() const { return m_arguments.size(); }
 
     private:
-        ScriptString m_functionName;
+        String m_functionName;
         String m_sourceURL;
         unsigned m_lineNumber;
 
diff --git a/WebCore/bindings/v8/ScriptFunctionCall.cpp b/WebCore/bindings/v8/ScriptFunctionCall.cpp
index 29dbb02..3ea536e 100644
--- a/WebCore/bindings/v8/ScriptFunctionCall.cpp
+++ b/WebCore/bindings/v8/ScriptFunctionCall.cpp
@@ -33,7 +33,6 @@
 
 #include "ScriptScope.h"
 #include "ScriptState.h"
-#include "ScriptString.h"
 #include "ScriptValue.h"
 
 #include "V8Binding.h"
@@ -54,12 +53,6 @@ void ScriptCallArgumentHandler::appendArgument(const ScriptObject& argument)
     m_arguments.append(argument);
 }
 
-void ScriptCallArgumentHandler::appendArgument(const ScriptString& argument)
-{
-    ScriptScope scope(m_scriptState);
-    m_arguments.append(v8String(argument));
-}
-
 void ScriptCallArgumentHandler::appendArgument(const ScriptValue& argument)
 {
     m_arguments.append(argument);
diff --git a/WebCore/bindings/v8/ScriptFunctionCall.h b/WebCore/bindings/v8/ScriptFunctionCall.h
index 04dddc8..d4f63ac 100644
--- a/WebCore/bindings/v8/ScriptFunctionCall.h
+++ b/WebCore/bindings/v8/ScriptFunctionCall.h
@@ -39,14 +39,12 @@
 namespace WebCore {
     class ScriptValue;
     class ScriptState;
-    class ScriptString;
 
     class ScriptCallArgumentHandler {
     public:
         ScriptCallArgumentHandler(ScriptState* scriptState) : m_scriptState(scriptState) { }
 
         void appendArgument(const ScriptObject&);
-        void appendArgument(const ScriptString&);
         void appendArgument(const ScriptValue&);
         void appendArgument(const String&);
         void appendArgument(const char*);
diff --git a/WebCore/bindings/v8/ScriptString.h b/WebCore/bindings/v8/ScriptString.h
deleted file mode 100644
index 414818a..0000000
--- a/WebCore/bindings/v8/ScriptString.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "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 THE COPYRIGHT
- * OWNER 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 ScriptString_h
-#define ScriptString_h
-
-#include "PlatformString.h"
-#include "ScriptStringImpl.h"
-#include "V8Binding.h"
-
-namespace WebCore {
-
-class ScriptString {
-public:
-    ScriptString() : m_impl(0) {}
-    ScriptString(const String& s) : m_impl(ScriptStringImpl::create(s)) {}
-    ScriptString(const char* s) : m_impl(ScriptStringImpl::create(s)) {}
-
-    operator String() const { return m_impl->toString(); }
-
-    bool isNull() const { return !m_impl.get() || m_impl->isNull(); }
-    size_t size() const { return m_impl->size(); }
-
-    ScriptString& operator=(const char* s)
-    {
-        m_impl = ScriptStringImpl::create(s);
-        return *this;
-    }
-
-    ScriptString& operator+=(const String& s)
-    {
-        m_impl->append(s);
-        return *this;
-    }
-
-    v8::Handle<v8::Value> v8StringOrNull() const
-    {
-        return isNull() ? v8::Handle<v8::Value>(v8::Null()) : v8::Handle<v8::Value>(m_impl->v8StringHandle());
-    }
-
-private:
-    RefPtr<ScriptStringImpl> m_impl;
-};
-
-} // namespace WebCore
-
-#endif // ScriptString_h
diff --git a/WebCore/bindings/v8/ScriptStringImpl.cpp b/WebCore/bindings/v8/ScriptStringImpl.cpp
deleted file mode 100644
index afe74b1..0000000
--- a/WebCore/bindings/v8/ScriptStringImpl.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "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 THE COPYRIGHT
- * OWNER 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 "ScriptStringImpl.h"
-
-#include "V8Binding.h"
-
-namespace WebCore {
-
-ScriptStringImpl::ScriptStringImpl(const String& s)
-{
-    v8::HandleScope scope;
-    m_handle.set(v8String(s));
-}
-
-ScriptStringImpl::ScriptStringImpl(const char* s)
-{
-    v8::HandleScope scope;
-    m_handle.set(v8::String::New(s));
-}
-
-String ScriptStringImpl::toString() const
-{
-    return v8StringToWebCoreString(m_handle.get());
-}
-
-bool ScriptStringImpl::isNull() const
-{
-    return m_handle.get().IsEmpty();
-}
-
-size_t ScriptStringImpl::size() const
-{
-    return m_handle.get()->Length();
-}
-
-void ScriptStringImpl::append(const String& s)
-{
-    v8::HandleScope scope;
-    if (m_handle.get().IsEmpty())
-        m_handle.set(v8String(s));
-    else
-        m_handle.set(v8::String::Concat(m_handle.get(), v8String(s)));
-}
-
-} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptStringImpl.h b/WebCore/bindings/v8/ScriptStringImpl.h
deleted file mode 100644
index 84a25c4..0000000
--- a/WebCore/bindings/v8/ScriptStringImpl.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "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 THE COPYRIGHT
- * OWNER 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 ScriptStringImpl_h
-#define ScriptStringImpl_h
-
-#include "OwnHandle.h"
-#include "PlatformString.h"
-
-#include <v8.h>
-
-namespace WebCore {
-
-// This class is used for strings that tend to be shared with JavaScript frequently.  The JSC implementation uses wtf::UString - see bindings/js/ScriptString.h
-// Currently XMLHttpRequest uses a ScriptString to build up the responseText attribute.  As data arrives from the network, it is appended to the ScriptString
-// via operator+= and a JavaScript readystatechange event is fired.  JavaScript can access the responseText attribute of the XMLHttpRequest object.  JavaScript
-// may also query the responseXML attribute of the XMLHttpRequest object which results in the responseText attribute being coerced into a WTF::String and
-// then parsed as an XML document.
-// This implementation optimizes for the common case where the responseText is built up with many calls to operator+= before the actual text is queried.
-class ScriptStringImpl : public RefCounted<ScriptStringImpl> {
-public:
-    static PassRefPtr<ScriptStringImpl> create(const String& s)
-    {
-        return adoptRef(new ScriptStringImpl(s));
-    }
-
-    static PassRefPtr<ScriptStringImpl> create(const char* s)
-    {
-        return adoptRef(new ScriptStringImpl(s));
-    }
-
-    String toString() const;
-
-    bool isNull() const;
-    size_t size() const;
-
-    void append(const String& s);
-
-    v8::Handle<v8::String> v8StringHandle() { return m_handle.get(); }
-
-private:
-    ScriptStringImpl(const String& s);
-    ScriptStringImpl(const char* s);
-
-    OwnHandle<v8::String> m_handle;
-};
-
-} // namespace WebCore
-
-#endif // ScriptStringImpl_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list