Closed Bug 823932 Opened 12 years ago Closed 12 years ago

Change leaksoup to use nsAutoTArray rather than nsAutoVoidArray

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Attached patch The fixSplinter Review
nsVoidArray and friends are slowly being removed. leaksoup.cpp is the last use of nsAutoVoidArray, so once we clean that up, then we can remove nsAutoVoidArray.

The attached patch switches leaksoup.cpp to use nsAutoTArray.
Attachment #694845 - Flags: review?(dbaron)
Blocks: 823940
Comment on attachment 694845 [details] [diff] [review]
The fix

>-            while (stack.Count() > 0) {
>-                uint32_t pos = stack.Count() - 1;
>+            while (stack.Length() > 0) {
>+                uint32_t pos = stack.Length() - 1;
>                 AllocationNode *n =
>                     static_cast<AllocationNode*>(stack[pos]);

You can get rid of the cast here too.

r=dbaron

Thanks for fixing this.
Attachment #694845 - Flags: review?(dbaron) → review+
https://hg.mozilla.org/mozilla-central/rev/96898e6b3078
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: