Bug 49882

Summary: Use WTF_ARRAY_LENGTH in WebCore directory
Product: WebKit Reporter: Patrick R. Gansterer <paroga>
Component: WebCore Misc.Assignee: Patrick R. Gansterer <paroga>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, dglazkov, eric, gustavo, ossy, webkit-ews, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Patrick R. Gansterer 2010-11-21 09:39:00 PST
see patch
Comment 1 Patrick R. Gansterer 2010-11-21 09:41:40 PST
Created attachment 74507 [details]
Patch
Comment 2 WebKit Review Bot 2010-11-21 09:48:21 PST
Attachment 74507 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/6274043
Comment 3 Early Warning System Bot 2010-11-21 09:53:18 PST
Attachment 74507 [details] did not build on qt:
Build output: http://queues.webkit.org/results/6246088
Comment 4 Patrick R. Gansterer 2010-11-21 09:53:22 PST
Created attachment 74508 [details]
Patch
Comment 5 Eric Seidel (no email) 2010-11-21 09:53:51 PST
Attachment 74507 [details] did not build on mac:
Build output: http://queues.webkit.org/results/6246089
Comment 6 WebKit Review Bot 2010-11-21 09:56:05 PST
Attachment 74507 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/6128104
Comment 7 WebKit Review Bot 2010-11-21 09:58:12 PST
Attachment 74508 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/6217127
Comment 8 Build Bot 2010-11-21 10:02:27 PST
Attachment 74507 [details] did not build on win:
Build output: http://queues.webkit.org/results/6118106
Comment 9 Early Warning System Bot 2010-11-21 10:04:08 PST
Attachment 74508 [details] did not build on qt:
Build output: http://queues.webkit.org/results/6144106
Comment 10 Patrick R. Gansterer 2010-11-21 10:05:34 PST
Created attachment 74509 [details]
Patch
Comment 11 WebKit Review Bot 2010-11-21 10:07:50 PST
Attachment 74508 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/6257080
Comment 12 Patrick R. Gansterer 2010-11-21 10:10:39 PST
Created attachment 74510 [details]
Patch
Comment 13 Eric Seidel (no email) 2010-11-21 10:13:24 PST
Attachment 74507 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/6164119
Comment 14 Eric Seidel (no email) 2010-11-21 10:35:39 PST
Attachment 74508 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/6141110
Comment 15 Csaba Osztrogonác 2010-11-21 15:44:36 PST
Comment on attachment 74510 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74510&action=review

> WebCore/html/canvas/WebGLBuffer.cpp:182
> +    size_t numEntries = WTF_ARRAY_LENGTH(m_maxIndexCache);
> +    for (size_t i = 0; i < numEntries; ++i)

We don't need numEntries variable here. Please fix this before landing:
for (size_t i = 0; i < WTF_ARRAY_LENGTH(m_maxIndexCache); ++i)

Otherwise LGTM.
Comment 16 Patrick R. Gansterer 2010-11-21 15:47:54 PST
Comment on attachment 74510 [details]
Patch

(In reply to comment #15)
> (From update of attachment 74510 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=74510&action=review
> 
> > WebCore/html/canvas/WebGLBuffer.cpp:182
> > +    size_t numEntries = WTF_ARRAY_LENGTH(m_maxIndexCache);
> > +    for (size_t i = 0; i < numEntries; ++i)
> 
> We don't need numEntries variable here. Please fix this before landing:
> for (size_t i = 0; i < WTF_ARRAY_LENGTH(m_maxIndexCache); ++i)
> 
> Otherwise LGTM.
I removed numEntries in a first version, but the compiled said NO ;-)
It's used in http://trac.webkit.org/browser/trunk/WebCore/html/canvas/WebGLBuffer.cpp?rev=68424#L190.
Comment 17 Csaba Osztrogonác 2010-11-21 15:52:21 PST
(In reply to comment #16)
> I removed numEntries in a first version, but the compiled said NO ;-)
> It's used in http://trac.webkit.org/browser/trunk/WebCore/html/canvas/WebGLBuffer.cpp?rev=68424#L190.

Ooops, you're right. :)
Comment 18 WebKit Commit Bot 2010-11-21 16:10:51 PST
Comment on attachment 74510 [details]
Patch

Clearing flags on attachment: 74510

Committed r72500: <http://trac.webkit.org/changeset/72500>
Comment 19 WebKit Commit Bot 2010-11-21 16:10:58 PST
All reviewed patches have been landed.  Closing bug.