[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:56:43 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9c48a71a236b895c2afaa27379b500f04075cf0d
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 5 20:30:45 2002 +0000
Fixed special case of retain count being -1.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 77d305b..93cda6f 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,32 @@
+2002-03-05 Richard Williamson <rjw at apple.com>
+
+ With fonts now being correctly specified we're exercising some new code paths. This introduced a new
+ class of weird string bugs. Turns out that CFString is doing some mojo that I suspect is a performance
+ optimization. Constants strings appears to be uniqued and hard-wired to have a -1 retain count. It
+ looks like strings created by preferences are uniqued in this manner. This plays havoc with our
+ copy-on-write QString implementation. The following GDB exercise illustrates the problem:
+
+ (gdb) po (id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]]
+ Andale Mono
+ (gdb) p (int)[(id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]] retainCount]
+ $28 = -1
+ (gdb) p (id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]]
+ $27 = (objc_object *) 0x40172a4
+ (gdb) p (void)[$27 retain]
+ $29 = void
+ (gdb) p (int)[$27 retainCount]
+ $30 = -1
+ (gdb) p (void)[$27 release]
+ $33 = void
+ (gdb) p (int)[$27 retainCount]
+ $32 = -1
+
+ So, it appears that these strings are permanently allocated. It'd be interesting to find out what is in the uniqued string cache, and how big it is.
+
+ I've fixed the problem by special casing our copy-on-write trigger to also check for -1.
+
+ * src/kwq/KWQString.mm: (QString::_copyIfNeededInternalString):
+
2002-03-04 Richard Williamson <rjw at apple.com>
Changes to support 'provisional' data sources.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 77d305b..93cda6f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,32 @@
+2002-03-05 Richard Williamson <rjw at apple.com>
+
+ With fonts now being correctly specified we're exercising some new code paths. This introduced a new
+ class of weird string bugs. Turns out that CFString is doing some mojo that I suspect is a performance
+ optimization. Constants strings appears to be uniqued and hard-wired to have a -1 retain count. It
+ looks like strings created by preferences are uniqued in this manner. This plays havoc with our
+ copy-on-write QString implementation. The following GDB exercise illustrates the problem:
+
+ (gdb) po (id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]]
+ Andale Mono
+ (gdb) p (int)[(id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]] retainCount]
+ $28 = -1
+ (gdb) p (id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]]
+ $27 = (objc_object *) 0x40172a4
+ (gdb) p (void)[$27 retain]
+ $29 = void
+ (gdb) p (int)[$27 retainCount]
+ $30 = -1
+ (gdb) p (void)[$27 release]
+ $33 = void
+ (gdb) p (int)[$27 retainCount]
+ $32 = -1
+
+ So, it appears that these strings are permanently allocated. It'd be interesting to find out what is in the uniqued string cache, and how big it is.
+
+ I've fixed the problem by special casing our copy-on-write trigger to also check for -1.
+
+ * src/kwq/KWQString.mm: (QString::_copyIfNeededInternalString):
+
2002-03-04 Richard Williamson <rjw at apple.com>
Changes to support 'provisional' data sources.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 77d305b..93cda6f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,32 @@
+2002-03-05 Richard Williamson <rjw at apple.com>
+
+ With fonts now being correctly specified we're exercising some new code paths. This introduced a new
+ class of weird string bugs. Turns out that CFString is doing some mojo that I suspect is a performance
+ optimization. Constants strings appears to be uniqued and hard-wired to have a -1 retain count. It
+ looks like strings created by preferences are uniqued in this manner. This plays havoc with our
+ copy-on-write QString implementation. The following GDB exercise illustrates the problem:
+
+ (gdb) po (id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]]
+ Andale Mono
+ (gdb) p (int)[(id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]] retainCount]
+ $28 = -1
+ (gdb) p (id)[(id)[NSUserDefaults standardUserDefaults] objectForKey:(id)[NSString stringWithCString: "WebKitFixedFont"]]
+ $27 = (objc_object *) 0x40172a4
+ (gdb) p (void)[$27 retain]
+ $29 = void
+ (gdb) p (int)[$27 retainCount]
+ $30 = -1
+ (gdb) p (void)[$27 release]
+ $33 = void
+ (gdb) p (int)[$27 retainCount]
+ $32 = -1
+
+ So, it appears that these strings are permanently allocated. It'd be interesting to find out what is in the uniqued string cache, and how big it is.
+
+ I've fixed the problem by special casing our copy-on-write trigger to also check for -1.
+
+ * src/kwq/KWQString.mm: (QString::_copyIfNeededInternalString):
+
2002-03-04 Richard Williamson <rjw at apple.com>
Changes to support 'provisional' data sources.
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index b542e35..301066b 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -1091,7 +1091,7 @@ QString &QString::append(const QString &qs)
void QString::_copyIfNeededInternalString()
{
- if (s && CFGetRetainCount(s) > 1) {
+ if (s && CFGetRetainCount(s) > 1 || CFGetRetainCount(s) == -1) {
CFMutableStringRef tmp;
tmp = CFStringCreateMutableCopy(kCFAllocatorDefault, 0, s);
_cf_release (s);
diff --git a/WebCore/src/kwq/KWQString.mm b/WebCore/src/kwq/KWQString.mm
index b542e35..301066b 100644
--- a/WebCore/src/kwq/KWQString.mm
+++ b/WebCore/src/kwq/KWQString.mm
@@ -1091,7 +1091,7 @@ QString &QString::append(const QString &qs)
void QString::_copyIfNeededInternalString()
{
- if (s && CFGetRetainCount(s) > 1) {
+ if (s && CFGetRetainCount(s) > 1 || CFGetRetainCount(s) == -1) {
CFMutableStringRef tmp;
tmp = CFStringCreateMutableCopy(kCFAllocatorDefault, 0, s);
_cf_release (s);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list