Klocwork issues: 176,177,532,631,632,956,957,958,960,1365,2267,2268,2269,4016,4017,4018,4019
Add Rob, patch to follow (limited to blackberry-specific code).
Created attachment 179650 [details] patch to address Klocwork issues
Comment on attachment 179650 [details] patch to address Klocwork issues Looks good in general but plugin change needs explaining.
(In reply to comment #3) > (From update of attachment 179650 [details]) > Looks good in general but plugin change needs explaining. Arg, my inline comment disappeared, sorry :( My question is, is it not a problem that the temp var gets deleted at end of scope? You are handing it over as a pointer.
I considered that possibility but it would be an exceptionally strange interface that the single pointer would have a longer lifetime than the event containing it (in my change the scope of the drawRect is exactly the same as the scope of the event). From my reading of the code, the drawRect is a pointer because it can be an array of rects, not that its lifetime is different than the event. Note that this code will merrily consume 128 bytes of stack space each time through the loop reusing the event struct each time. The new code is simpler and consumes far less stack space for what is essentially the same semantics. To further reinforce the scope of the pointer issue, the alloca allocation would go away after the loop is done since the method returns immediately, it can't have a longer lifetime than the event call.
Comment on attachment 179650 [details] patch to address Klocwork issues After discussing with Yong and Anthony's explanation, looks good.
Comment on attachment 179650 [details] patch to address Klocwork issues Clearing flags on attachment: 179650 Committed r137908: <http://trac.webkit.org/changeset/137908>
All reviewed patches have been landed. Closing bug.