Last Comment Bug 695255 - Replace uses of NS_ARRAY_LENGTH with mozilla::ArrayLength and mozilla::ArrayEnd in MailNews
: Replace uses of NS_ARRAY_LENGTH with mozilla::ArrayLength and mozilla::ArrayE...
[good first bug][mentor=Neil][lang=c++]
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: All All
-- normal (vote)
: Thunderbird 16.0
Assigned To: daletron
Depends on: arraylength
  Show dependency treegraph
Reported: 2011-10-17 21:07 PDT by Philip Chee
Modified: 2012-07-12 21:36 PDT (History)
8 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

a patch that attempts to fix the bug (10.11 KB, patch)
2012-05-23 19:53 PDT, daletron
neil: review+
Details | Diff | Splinter Review

Description User image Philip Chee 2011-10-17 21:07:29 PDT

Comment 1 User image Philip Chee 2011-10-17 21:20:05 PDT
Bug 693469:  Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible.  (Exceptions: assigning to static initializers, use in static assertions, as template parameters, etc.  These will go away when the relevant compilers have C++11 constexpr support.)
Comment 2 User image daletron 2012-04-30 17:37:57 PDT
Hi, me and a couple of students would like to take on this bug.  Can we be assigned to this?
Comment 3 User image Philip Chee 2012-04-30 20:59:37 PDT
Sure just go for it. You should also read the following if you haven't already done so:

Please visit us on IRC if you have any questions:
irc://moznet/seamonkey for SeaMonkey specific issues and also anything you want to discuss or need advice on.
irc://moznet/introduction for help with your first patch.
Comment 4 User image daletron 2012-05-23 19:53:35 PDT
Created attachment 626678 [details] [diff] [review]
a patch that attempts to fix the bug
Comment 5 User image daletron 2012-05-23 19:54:21 PDT
Along with the patch, I also made changes to 


but for some reason can't get the patch to recognize the changes no matter what i do.  "hg diff" never recognizes it.
Comment 6 User image Philip Chee 2012-05-23 20:55:51 PDT
> "hg diff" never recognizes it.
Try "hg qrefresh"
Comment 7 User image daletron 2012-05-23 21:41:54 PDT
hey Philip, ya I been doing the "hg qrefresh" everytime i wanted to push a change into my patch.  (and hg diff to make sure they recognize my change)

i was talking to some people in #introduction about it, and one person said according to this bugzilla report that he doesn't think i need or should change those files, and another says it might be because the files aren't technically in the comm-central repository?  or that they're a sub-repo from mozilla-central?
Comment 8 User image Tony Mechelynck [:tonymec]. (NEEDINFO me if you want my attention) 2012-05-23 22:41:36 PDT
In reply to comment #7:
Yes, a separate patch should be written for each of the (up to 6) repositories affected, as shown in the following listing (giving the top-level directory of each embedded repository relative to your comm-central clone). For each file the lowest directory tree containing it is what counts.

comm-central    is ./
mozilla-central is ./mozilla
chatzilla       is ./mozilla/extensions/irc
DOM Inspector   is ./mozilla/extensions/inspector
LDAP SDK        is ./ldap/sdks
Venkman         is ./mozilla/extensions/venkman

And once the patches are ready, a separate commit should be done for each of them, then a push to the appropriate repository. Normally this push is taken care of by some "trusted" developer once you set the checkin-needed flag.
Comment 9 User image Philip Chee 2012-07-10 01:43:13 PDT
Dale, is your patch ready for review? If you you need to flag it for review and set the requestee flag to Neil@parkway
Comment 10 User image daletron 2012-07-10 16:22:48 PDT
Hey Philip sorry for the delay, was going to try and find someone to run my patch with the Thunderbird test servers that you were talking about but been a little busy with another project.  I'm going to go ahead and flag it for review and see how it goes.
Comment 11 User image 2012-07-11 14:20:36 PDT
Comment on attachment 626678 [details] [diff] [review]
a patch that attempts to fix the bug

Worked on my local Linux build and on Thunderbird Try (well, there was some other bustage but I don't think it was caused by the patch.)
Comment 12 User image Mozilla RelEng Bot 2012-07-11 17:30:29 PDT
Try run for 6cf6df7e2add is complete.
Detailed breakdown of the results available here:
Results (out of 34 total builds):
    exception: 1
    success: 9
    warnings: 18
    failure: 6
Builds (or logs if builds failed) available at:
Comment 14 User image Ryan VanderMeulen [:RyanVM] 2012-07-12 17:07:36 PDT
Comment 15 User image daletron 2012-07-12 17:46:05 PDT
Hey guys, noticed Ryan changed the status/resolution to resolved and fixed.  Just to clarify, does that mean everything is fixed and nothing further needs to be done?

Because according to the Mozilla RelEng Bot post, i see an exception and 6 failures... so I'm assuming otherwise.
Comment 16 User image Philip Chee 2012-07-12 21:28:35 PDT
>  Comment 15     daletron (New to Bugzilla)      2012-07-12 17:46:05 PDT
> i see an exception and 6 failures... so I'm assuming otherwise.
See below:

>  Comment 11      2012-07-11 14:20:36 PDT
> (well, there was some other bustage but I don't think it was caused by the patch.)

Thanks Dale!
Comment 17 User image daletron 2012-07-12 21:36:04 PDT
Thanks Philip and everyone else for your help!

Note You need to log in before you can comment on or make changes to this bug.