[Webkit-unassigned] [Bug 30805] Add MessageQueue::removeWithPredicate to remove certain tasks without pulling them from the queue.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 28 13:54:29 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=30805
David Levin <levin at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #42047|review? |review+
Flag| |
--- Comment #2 from David Levin <levin at chromium.org> 2009-10-28 13:54:28 PDT ---
(From update of attachment 42047)
Just a few nits. Please fix and submit.
> diff --git a/JavaScriptCore/wtf/MessageQueue.h b/JavaScriptCore/wtf/MessageQueue.h
> + void removeWithPredicate(Predicate&);
Consider using "removeIf" instead of "removeWithPredicate" (It is similar in
naming to the findIf method on Deque).
> + inline void MessageQueue<DataType>::removeWithPredicate(Predicate& predicate)
> + {
> + MutexLocker lock(m_mutex);
> + DequeConstIterator<DataType> found = m_queue.end();
> + while ((found = m_queue.findIf(predicate)) != m_queue.end()) {
> + m_queue.remove(found); ASSERT(0);
Please remove "ASSERT(0);"
> diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
> + (WebCore::SameDatabasePredicate::SameDatabasePredicate): Added predicate that flags the tasks belonging to specified database.
Consider: to "a" specified database.
> + (WebCore::DatabaseThread::unscheduleDatabaseTasks): changed to use new removeWithPredicate method.
Consider: use "the" new removeWithPredicate
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list