[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:42:36 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 3773e91a3594cc363948759d12d708c682cda144
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 4 20:01:20 2009 +0000
2009-12-04 Zoltan Herczeg <zherczeg at inf.u-szeged.hu>
Reviewed by Darin Adler.
Check whether the right side of a string append is non-empty
https://bugs.webkit.org/show_bug.cgi?id=32151
Especially beneficial for CachedScript::script() method
which usually appends an empty string returned by flush()
to its m_script member. m_script is often hundreds of kbytes
which is duplated without reason.
* platform/text/String.cpp:
(WebCore::String::append):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 695498f..450a638 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-04 Zoltan Herczeg <zherczeg at inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Check whether the right side of a string append is non-empty
+ https://bugs.webkit.org/show_bug.cgi?id=32151
+
+ Especially beneficial for CachedScript::script() method
+ which usually appends an empty string returned by flush()
+ to its m_script member. m_script is often hundreds of kbytes
+ which is duplated without reason.
+
+ * platform/text/String.cpp:
+ (WebCore::String::append):
+
2009-12-04 Enrica Casucci <enrica at apple.com>
Reviewed by John Sullivan.
diff --git a/WebCore/platform/text/String.cpp b/WebCore/platform/text/String.cpp
index 44582a9..24659a4 100644
--- a/WebCore/platform/text/String.cpp
+++ b/WebCore/platform/text/String.cpp
@@ -81,6 +81,9 @@ String::String(const char* str, unsigned length)
void String::append(const String& str)
{
+ if (str.isEmpty())
+ return;
+
// FIXME: This is extremely inefficient. So much so that we might want to take this
// out of String's API. We can make it better by optimizing the case where exactly
// one String is pointing at this StringImpl, but even then it's going to require a
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list