Note: There are a few cases of duplicates in user autocompletion which are being worked on.

mozilla array guide uses deprecated function NS_NewArray

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Stig Sandø, Assigned: bsmedberg)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

The function NS_NewArray was removed from the SDK but is still used in the Mozilla Array Guide.  The removal from the code:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=/mozilla/xpcom/ds&command=DIFF_FRAMESET&file=nsArray.h&rev2=1.12&rev1=1.11

Mozilla Array guide:
http://www.mozilla.org/projects/xpcom/array-guide.html



Reproducible: Always




The sample code that uses NS_NewArray:
void GetList(nsIArray** aResult) {
        nsCOMPtr<nsIMutableArray> array;
        NS_NewArray(getter_AddRefs(array));

        // append some elements
        ...

        // return it to the caller
        *aResult = array;
        NS_ADDREF(*aResult);
    }

Updated

11 years ago
Assignee: wtchang → nobody
Component: NSPR → XPCOM
Product: NSPR → Core
QA Contact: wtchang → xpcom
Version: other → Trunk

Comment 1

11 years ago
Boris, this is a documentation bug in the
"Guide to the Mozilla Array Classes" that you
and Alec Flett wrote.

Comment 2

11 years ago
I didn't write most of this guide, actually.  I just did that last "Which Array should I use?" section.

More to the point, I have no idea what the docs should say now.  Benjamin, mind updating the docs to reflect the new world?

Updated

11 years ago
Assignee: nobody → benjamin

Updated

11 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 3

11 years ago
Fixed on MDC.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.