[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
cevans at google.com
cevans at google.com
Wed Dec 22 14:21:41 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 817da7bdcd0acc9ab767ca191fb8dc762624a08b
Author: cevans at google.com <cevans at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 7 06:57:06 2010 +0000
2010-10-06 Chris Evans <cevans at google.com>
Reviewed by David Levin.
https://bugs.webkit.org/show_bug.cgi?id=47248
Use size_t consistently in CString, to prevent theoretical trouble
with > 4GB strings on 64-bit platforms.
* wtf/text/CString.h:
* wtf/text/CString.cpp:
Use size_t for string lengths.
* wtf/MD5.cpp:
(WTF::expectMD5): use suitable format string + cast for size_t.
* JavaScriptCore.exp:
Update symbol name.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index be0c682..b9c9f90 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-06 Chris Evans <cevans at google.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47248
+
+ Use size_t consistently in CString, to prevent theoretical trouble
+ with > 4GB strings on 64-bit platforms.
+
+ * wtf/text/CString.h:
+ * wtf/text/CString.cpp:
+ Use size_t for string lengths.
+ * wtf/MD5.cpp:
+ (WTF::expectMD5): use suitable format string + cast for size_t.
+ * JavaScriptCore.exp:
+ Update symbol name.
+
2010-10-06 Anders Carlsson <andersca at apple.com>
Reviewed by Sam Weinig.
diff --git a/JavaScriptCore/JavaScriptCore.exp b/JavaScriptCore/JavaScriptCore.exp
index ff3d9b3..f773f0b 100644
--- a/JavaScriptCore/JavaScriptCore.exp
+++ b/JavaScriptCore/JavaScriptCore.exp
@@ -458,7 +458,7 @@ __ZN3WTF6strtodEPKcPPc
__ZN3WTF7CString11mutableDataEv
__ZN3WTF7CString16newUninitializedEmRPc
__ZN3WTF7CStringC1EPKc
-__ZN3WTF7CStringC1EPKcj
+__ZN3WTF7CStringC1EPKcm
__ZN3WTF7Unicode18convertUTF16ToUTF8EPPKtS2_PPcS4_b
__ZN3WTF7Unicode18convertUTF8ToUTF16EPPKcS2_PPtS4_b
__ZN3WTF7xmlAtomE
diff --git a/JavaScriptCore/wtf/MD5.cpp b/JavaScriptCore/wtf/MD5.cpp
index 375446e..c926a7b 100644
--- a/JavaScriptCore/wtf/MD5.cpp
+++ b/JavaScriptCore/wtf/MD5.cpp
@@ -76,7 +76,7 @@ static void expectMD5(CString input, CString expected)
snprintf(buf, 3, "%02x", digest.at(i));
buf += 2;
}
- ASSERT_WITH_MESSAGE(actual == expected, "input:%s[%d] actual:%s expected:%s", input.data(), input.length(), actual.data(), expected.data());
+ ASSERT_WITH_MESSAGE(actual == expected, "input:%s[%lu] actual:%s expected:%s", input.data(), static_cast<unsigned long>(input.length()), actual.data(), expected.data());
}
static void testMD5()
diff --git a/JavaScriptCore/wtf/text/CString.cpp b/JavaScriptCore/wtf/text/CString.cpp
index 7d09f12..c048a1b 100644
--- a/JavaScriptCore/wtf/text/CString.cpp
+++ b/JavaScriptCore/wtf/text/CString.cpp
@@ -36,12 +36,12 @@ CString::CString(const char* str)
init(str, strlen(str));
}
-CString::CString(const char* str, unsigned length)
+CString::CString(const char* str, size_t length)
{
init(str, length);
}
-void CString::init(const char* str, unsigned length)
+void CString::init(const char* str, size_t length)
{
if (!str)
return;
diff --git a/JavaScriptCore/wtf/text/CString.h b/JavaScriptCore/wtf/text/CString.h
index d8250c5..343a7a5 100644
--- a/JavaScriptCore/wtf/text/CString.h
+++ b/JavaScriptCore/wtf/text/CString.h
@@ -40,8 +40,8 @@ public:
private:
friend class CString;
- static PassRefPtr<CStringBuffer> create(unsigned length) { return adoptRef(new CStringBuffer(length)); }
- CStringBuffer(unsigned length) : m_vector(length) { }
+ static PassRefPtr<CStringBuffer> create(size_t length) { return adoptRef(new CStringBuffer(length)); }
+ CStringBuffer(size_t length) : m_vector(length) { }
char* mutableData() { return m_vector.data(); }
Vector<char> m_vector;
@@ -53,7 +53,7 @@ class CString {
public:
CString() { }
CString(const char*);
- CString(const char*, unsigned length);
+ CString(const char*, size_t length);
CString(CStringBuffer* buffer) : m_buffer(buffer) { }
static CString newUninitialized(size_t length, char*& characterBuffer);
@@ -62,7 +62,7 @@ public:
return m_buffer ? m_buffer->data() : 0;
}
char* mutableData();
- unsigned length() const
+ size_t length() const
{
return m_buffer ? m_buffer->length() - 1 : 0;
}
@@ -73,7 +73,7 @@ public:
private:
void copyBufferIfNeeded();
- void init(const char*, unsigned length);
+ void init(const char*, size_t length);
RefPtr<CStringBuffer> m_buffer;
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list