[Webkit-unassigned] [Bug 103006] [EFL][WK2] Missing the routine to check the validation for workqueue

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 23 04:20:42 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=103006





--- Comment #32 from Mikhail Pozdnyakov <mikhail.pozdnyakov at intel.com>  2012-11-23 04:22:45 PST ---
(In reply to comment #29)
> (In reply to comment #28)
> > (From update of attachment 175761 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=175761&action=review
> > 
> > >>>>> Source/WebKit2/Platform/efl/WorkQueueEfl.cpp:85
> > >>>>> +        for (size_t i = 0; i < workItemQueue.size(); ++i) {
> > >>>> 
> > >>>> Please cache workItemQueue.size() before the loop.
> > >>> 
> > >>> Could you explain why it is required?
> > >> 
> > >> This is WebKit coding style and this makes sure that the queue size is not retrieved (possibly computed) for every iteration of the loop.
> > > 
> > > Is it WebKit coding style? There are so many uses like the style in WebKit.
> > 
> > From http://www.webkit.org/coding/coding-style.html:
> > size_t frameViewsCount = frameViews.size();
> > for (size_t i = i; i < frameViewsCount; ++i)
> >     frameViews[i]->updateLayoutAndStyleIfNeededRecursive();
> > 
> 
> Could check the title for your example?
> "Prefer index over iterator in Vector iterations for a terse, easier-to-read code."
> As I think, it means that index style "[i]" is recommended instead of iterator style "::iterator", ".begin()".
> 
We are not lawyers here. What's the problem to cache container size? it makes code better anyway.

-- 
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