[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:12:56 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 909763d8eb12003cdf63294ef83e6d9b539b7abf
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed May 15 19:03:10 2002 +0000
* kwq/KWQListImpl.mm:
(KWQListImpl::KWQListPrivate::copyList): Take out unnecessary line of code.
(KWQListImpl::KWQListPrivate::~KWQListPrivate): Delete the iterator nodes
also, not just the item nodes. Fixes a storage leak.
(KWQListIteratorImpl::KWQListIteratorPrivate::KWQListIteratorPrivate):
Change interface to take a list pointer so we don't rely on the undefined
behavior of &* on a null pointer.
(KWQListImpl::addIterator): Set up the prev pointer of the old head of
the list. This was causing the crash I was debugging.
(KWQListIteratorImpl::operator=): Simpler implementation.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 2d42c2b..ea2fffc 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-05-15 Darin Adler <darin at apple.com>
+
+ * kwq/KWQListImpl.mm:
+ (KWQListImpl::KWQListPrivate::copyList): Take out unnecessary line of code.
+ (KWQListImpl::KWQListPrivate::~KWQListPrivate): Delete the iterator nodes
+ also, not just the item nodes. Fixes a storage leak.
+ (KWQListIteratorImpl::KWQListIteratorPrivate::KWQListIteratorPrivate):
+ Change interface to take a list pointer so we don't rely on the undefined
+ behavior of &* on a null pointer.
+ (KWQListImpl::addIterator): Set up the prev pointer of the old head of
+ the list. This was causing the crash I was debugging.
+ (KWQListIteratorImpl::operator=): Simpler implementation.
+
2002-05-14 Richard J. Williamson <rjw at apple.com>
Added another symbol for stack based event constructor.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 2d42c2b..ea2fffc 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2002-05-15 Darin Adler <darin at apple.com>
+
+ * kwq/KWQListImpl.mm:
+ (KWQListImpl::KWQListPrivate::copyList): Take out unnecessary line of code.
+ (KWQListImpl::KWQListPrivate::~KWQListPrivate): Delete the iterator nodes
+ also, not just the item nodes. Fixes a storage leak.
+ (KWQListIteratorImpl::KWQListIteratorPrivate::KWQListIteratorPrivate):
+ Change interface to take a list pointer so we don't rely on the undefined
+ behavior of &* on a null pointer.
+ (KWQListImpl::addIterator): Set up the prev pointer of the old head of
+ the list. This was causing the crash I was debugging.
+ (KWQListIteratorImpl::operator=): Simpler implementation.
+
2002-05-14 Richard J. Williamson <rjw at apple.com>
Added another symbol for stack based event constructor.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2d42c2b..ea2fffc 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2002-05-15 Darin Adler <darin at apple.com>
+
+ * kwq/KWQListImpl.mm:
+ (KWQListImpl::KWQListPrivate::copyList): Take out unnecessary line of code.
+ (KWQListImpl::KWQListPrivate::~KWQListPrivate): Delete the iterator nodes
+ also, not just the item nodes. Fixes a storage leak.
+ (KWQListIteratorImpl::KWQListIteratorPrivate::KWQListIteratorPrivate):
+ Change interface to take a list pointer so we don't rely on the undefined
+ behavior of &* on a null pointer.
+ (KWQListImpl::addIterator): Set up the prev pointer of the old head of
+ the list. This was causing the crash I was debugging.
+ (KWQListIteratorImpl::operator=): Simpler implementation.
+
2002-05-14 Richard J. Williamson <rjw at apple.com>
Added another symbol for stack based event constructor.
diff --git a/WebCore/kwq/KWQListImpl.mm b/WebCore/kwq/KWQListImpl.mm
index aa47b14..78f48fa 100644
--- a/WebCore/kwq/KWQListImpl.mm
+++ b/WebCore/kwq/KWQListImpl.mm
@@ -41,7 +41,6 @@ public:
KWQListNode *prev;
};
-
KWQListNode::~KWQListNode()
{
delete next;
@@ -82,7 +81,6 @@ KWQListNode *KWQListImpl::KWQListPrivate::copyList(KWQListNode *l, KWQListNode *
}
copy->prev = last;
- copy->next = NULL;
last = copy;
node = node->next;
@@ -114,15 +112,17 @@ KWQListImpl::KWQListPrivate::KWQListPrivate(KWQListPrivate &vp) :
KWQListImpl::KWQListPrivate::~KWQListPrivate()
{
delete head;
+ delete iterators;
}
+
// KWQListIteratorImpl::KWQListIteratorPrivate
class KWQListIteratorImpl::KWQListIteratorPrivate
{
public:
KWQListIteratorPrivate();
- KWQListIteratorPrivate(const KWQListImpl &list, KWQListNode *n);
+ KWQListIteratorPrivate(const KWQListImpl *list, KWQListNode *n);
const KWQListImpl *list;
KWQListNode *node;
@@ -134,8 +134,8 @@ KWQListIteratorImpl::KWQListIteratorPrivate::KWQListIteratorPrivate() :
{
}
-KWQListIteratorImpl::KWQListIteratorPrivate::KWQListIteratorPrivate(const KWQListImpl &l, KWQListNode *n) :
- list(&l),
+KWQListIteratorImpl::KWQListIteratorPrivate::KWQListIteratorPrivate(const KWQListImpl *l, KWQListNode *n) :
+ list(l),
node(n)
{
}
@@ -156,10 +156,10 @@ KWQListImpl::KWQListImpl(const KWQListImpl &impl) :
KWQListImpl::~KWQListImpl()
{
- for (KWQListNode *iterator = d->iterators; iterator != NULL; iterator = iterator->next) {
- KWQListIteratorImpl::KWQListIteratorPrivate *p = ((KWQListIteratorImpl *)iterator->data)->d;
- p->node = 0;
- p->list = 0;
+ for (KWQListNode *node = d->iterators; node != NULL; node = node->next) {
+ KWQListIteratorImpl::KWQListIteratorPrivate *p = ((KWQListIteratorImpl *)node->data)->d;
+ p->list = NULL;
+ p->node = NULL;
}
delete d;
}
@@ -466,7 +466,6 @@ void *KWQListImpl::last()
return current();
}
-
void *KWQListImpl::next()
{
if (d->current != NULL) {
@@ -533,9 +532,12 @@ KWQListImpl &KWQListImpl::assign(const KWQListImpl &impl, bool deleteItems)
void KWQListImpl::addIterator(KWQListIteratorImpl *iter) const
{
- KWQListNode *node = new KWQListNode();
+ KWQListNode *node = new KWQListNode;
node->data = iter;
node->next = d->iterators;
+ if (node->next != NULL) {
+ node->next->prev = node;
+ }
d->iterators = node;
}
@@ -565,7 +567,6 @@ void KWQListImpl::removeIterator(KWQListIteratorImpl *iter) const
-
// KWQListIteratorImpl
KWQListIteratorImpl::KWQListIteratorImpl() :
@@ -574,9 +575,9 @@ KWQListIteratorImpl::KWQListIteratorImpl() :
}
KWQListIteratorImpl::KWQListIteratorImpl(const KWQListImpl &impl) :
- d(new KWQListIteratorImpl::KWQListIteratorPrivate(impl, impl.d->head))
+ d(new KWQListIteratorImpl::KWQListIteratorPrivate(&impl, impl.d->head))
{
- d->list->addIterator(this);
+ impl.addIterator(this);
}
KWQListIteratorImpl::~KWQListIteratorImpl()
@@ -588,9 +589,9 @@ KWQListIteratorImpl::~KWQListIteratorImpl()
}
KWQListIteratorImpl::KWQListIteratorImpl(const KWQListIteratorImpl &impl) :
- d(new KWQListIteratorImpl::KWQListIteratorPrivate(*impl.d->list, impl.d->node))
+ d(new KWQListIteratorImpl::KWQListIteratorPrivate(impl.d->list, impl.d->node))
{
- if (d->list) {
+ if (d->list != NULL) {
d->list->addIterator(this);
}
}
@@ -643,22 +644,13 @@ void *KWQListIteratorImpl::operator++()
KWQListIteratorImpl &KWQListIteratorImpl::operator=(const KWQListIteratorImpl &impl)
{
- KWQListIteratorImpl tmp(impl);
- KWQListIteratorImpl::KWQListIteratorPrivate *tmpD = tmp.d;
-
if (d->list != NULL) {
d->list->removeIterator(this);
}
- if (tmp.d->list != NULL) {
- tmp.d->list->removeIterator(&tmp);
- }
-
- tmp.d = d;
- d = tmpD;
-
- if (tmp.d->list != NULL) {
- tmp.d->list->addIterator(&tmp);
- }
+
+ d->list = impl.d->list;
+ d->node = impl.d->node;
+
if (d->list != NULL) {
d->list->addIterator(this);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list