[webkit-reviews] review granted: [Bug 23976] MessageQueue needs a way to wait for a message that satisfies an arbitrary criteria. : [Attachment 27773] Proposed fix.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 19 02:45:34 PST 2009


Alexey Proskuryakov <ap at webkit.org> has granted David Levin
<levin at chromium.org>'s request for review:
Bug 23976: MessageQueue needs a way to wait for a message that satisfies an
arbitrary criteria.
https://bugs.webkit.org/show_bug.cgi?id=23976

Attachment 27773: Proposed fix.
https://bugs.webkit.org/attachment.cgi?id=27773&action=review

------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
r=me

> +    inline DequeIterator<T> Deque<T>::findIf(Predicate predicate)
> +    {
> +	   for (iterator it = begin(); it != end(); ++it) {

If may be better to make compiler's life easier, and precompute end().

> +	       if ((*predicate)(*it))

Shouldn't this be "predicate(*it)"?

> +		   return it;
> +	   }
> +	   return end();
> +    }

+	 MessageQueueWaitResult waitForMessageFiltered(DataType&, Predicate);
	 MessageQueueWaitResult waitForMessageTimed(DataType&, double
absoluteTime);

Have you verified that timers do not fire in Firefox when waiting for a sync
XHR in a worker?


More information about the webkit-reviews mailing list